Unable to remove plugin-angular-universal plugin

Hi,

Few months back i enabled integration angular-universal-build-plugin from given url. recently i migrated from angular16 to angular 17 and when i am trying to build its getting failed because of angular-universal-build-plugin.

Deploy Logs after migration from angular16 to angular 17

10:53:40 AM: Netlify Build                                                 
10:53:40 AM: ────────────────────────────────────────────────────────────────
10:53:40 AM: ​
10:53:40 AM: ❯ Version
10:53:40 AM:   @netlify/build 29.36.3
10:53:40 AM: ​
10:53:40 AM: ❯ Flags
10:53:40 AM:   baseRelDir: true
10:53:40 AM:   buildId: 65f289b90bcbb10008d2bf0e
10:53:40 AM:   deployId: 65f289b90bcbb10008d2bf10
10:53:40 AM: ​
10:53:40 AM: ❯ Current directory
10:53:40 AM:   /opt/build/repo
10:53:40 AM: ​
10:53:40 AM: ❯ Config file
10:53:40 AM:   /opt/build/repo/netlify.toml
10:53:40 AM: ​
10:53:40 AM: ❯ Context
10:53:40 AM:   production
10:53:40 AM: ​
10:53:40 AM: ❯ Installing plugins
10:53:40 AM:    - @netlify/plugin-angular-universal@1.0.1
10:53:45 AM: ​
10:53:45 AM: ❯ Loading plugins
10:53:45 AM:    - @netlify/plugin-angular-universal@1.0.1 from Netlify app
10:53:45 AM:    - @netlify/plugin-lighthouse@6.0.0 from Netlify app
10:53:45 AM:    - @netlify/angular-runtime@2.0.6 from netlify.toml and package.json
10:53:46 AM: ​
10:53:46 AM: @netlify/plugin-angular-universal (onPreBuild event)          
10:53:46 AM: ────────────────────────────────────────────────────────────────
10:53:46 AM: ​
10:53:46 AM: FYI: You seem to be using a custom build script. Please make sure your script includes: ng build --configuration production && ng run airdroppad:serverless:production.
10:53:46 AM: ​
10:53:46 AM: (@netlify/plugin-angular-universal onPreBuild completed in 10ms)
10:53:46 AM: ​
10:53:46 AM: @netlify/angular-runtime (onPreBuild event)                   
10:53:46 AM: ────────────────────────────────────────────────────────────────
10:53:46 AM: ​
10:53:46 AM: ​
10:53:46 AM: (@netlify/angular-runtime onPreBuild completed in 8ms)
10:53:46 AM: ​
10:53:46 AM: build.command from netlify.toml                               
10:53:46 AM: ────────────────────────────────────────────────────────────────
10:53:46 AM: ​
10:53:46 AM: $ npm run build
10:53:46 AM: > airdroppad@0.0.0 build
10:53:46 AM: > ng build
10:53:47 AM: Workspace extension with invalid name (defaultProject) found.
10:53:47 AM: - Building...
10:54:15 AM: Browser bundles
10:54:15 AM: Initial chunk files     | Names               |  Raw size | Estimated transfer size
10:54:15 AM: chunk-GURDAKQK.js       | -                   |   1.58 MB |               307.48 kB
10:54:15 AM: styles-QXFIZAFD.css     | styles              | 821.63 kB |                64.74 kB
10:54:15 AM: main-UBJ4YVCM.js        | main                | 302.38 kB |                68.79 kB
10:54:15 AM: scripts-KFSOFON6.js     | scripts             | 279.34 kB |                71.03 kB
10:54:15 AM: polyfills-BJX5WH5B.js   | polyfills           |  34.37 kB |                11.21 kB
10:54:15 AM: chunk-VH7USTTD.js       | -                   |   5.37 kB |                 2.16 kB
10:54:15 AM: chunk-P4FKFBKP.js       | -                   |   2.37 kB |               924 bytes
10:54:15 AM: chunk-E5U3H25K.js       | -                   | 722 bytes |               722 bytes
10:54:15 AM:                         | Initial total       |   2.99 MB |               527.03 kB
10:54:15 AM: Lazy chunk files        | Names               |  Raw size | Estimated transfer size
10:54:15 AM: chunk-CJ6S3GUO.js       | dashboard-module    | 578.94 kB |                94.39 kB
10:54:15 AM: chunk-AHZPBTJ4.js       | auth-module         | 419.50 kB |               127.70 kB
10:54:15 AM: chunk-XJO3DQFW.js       | landing-module      | 140.35 kB |                24.28 kB
10:54:15 AM: chunk-JQ6S3Z5L.js       | no-head-module      |  19.43 kB |                 5.22 kB
10:54:15 AM: chunk-KR6YVAMN.js       | faq-module          |  17.89 kB |                 5.29 kB
10:54:15 AM: chunk-X6ZHWL2S.js       | -                   |  10.91 kB |                 3.13 kB
10:54:15 AM: chunk-45RKVCWA.js       | -                   |   2.66 kB |               918 bytes
10:54:15 AM: chunk-S346P62U.js       | -                   | 494 bytes |               494 bytes
10:54:15 AM: Server bundles
10:54:15 AM: Initial chunk files     | Names               |  Raw size
10:54:15 AM: chunk-FW4N3BYD.mjs      | -                   |   1.35 MB | 
10:54:15 AM: server.mjs              | server              |   1.08 MB | 
10:54:15 AM: chunk-VLKPGHJO.mjs      | -                   | 296.22 kB | 
10:54:15 AM: polyfills.server.mjs    | polyfills.server    | 262.93 kB | 
10:54:15 AM: chunk-KLN4KM4T.mjs      | -                   | 249.24 kB | 
10:54:15 AM: chunk-RA3KNJJO.mjs      | -                   |  71.12 kB | 
10:54:15 AM: chunk-XJ6DZAGD.mjs      | -                   |   5.44 kB | 
10:54:15 AM: chunk-EZ6RW67L.mjs      | -                   |   2.40 kB | 
10:54:15 AM: chunk-UQQY2DYU.mjs      | -                   |   1.64 kB | 
10:54:15 AM: chunk-C4ZAJBE2.mjs      | -                   | 792 bytes | 
10:54:15 AM: main.server.mjs         | main.server         | 294 bytes | 
10:54:15 AM: render-utils.server.mjs | render-utils.server | 254 bytes | 
10:54:15 AM: Lazy chunk files        | Names               |  Raw size
10:54:15 AM: chunk-WKUJL5D5.mjs      | dashboard-module    | 579.04 kB | 
10:54:15 AM: chunk-OH2DF6LE.mjs      | auth-module         | 523.48 kB | 
10:54:15 AM: chunk-TN7YPEOT.mjs      | landing-module      | 140.45 kB | 
10:54:15 AM: chunk-PAPMBWUD.mjs      | no-head-module      |  19.52 kB | 
10:54:15 AM: chunk-WMPITBSN.mjs      | faq-module          |  17.99 kB | 
10:54:15 AM: chunk-WJYYDL5X.mjs      | xhr2                |  11.80 kB | 
10:54:15 AM: chunk-662NN2Z2.mjs      | -                   |  10.99 kB | 
10:54:15 AM: chunk-WM24H53W.mjs      | -                   |   2.73 kB | 
10:54:15 AM: chunk-NEWK7LEN.mjs      | -                   | 530 bytes | 
10:54:15 AM: Output location: /opt/build/repo/dist/airdroppad
10:54:15 AM: Application bundle generation complete. [28.488 seconds]
10:54:15 AM: ▲ [WARNING] src/app/modules/dashboard/advertisements/add-advertisement/add-advertisement.component.css exceeded maximum budget. Budget 3.00 kB was not met by 149 bytes with a total of 3.15 kB.
10:54:15 AM: 
10:54:15 AM: 
10:54:15 AM: ▲ [WARNING] src/app/modules/dashboard/tokens/token-promotion/token-promotion.component.css exceeded maximum budget. Budget 3.00 kB was not met by 128 bytes with a total of 3.13 kB.
10:54:15 AM: 
10:54:15 AM: 
10:54:15 AM: ▲ [WARNING] src/app/modules/landing/home/home.component.css exceeded maximum budget. Budget 3.00 kB was not met by 620 bytes with a total of 3.61 kB.
10:54:15 AM: 
10:54:15 AM: 
10:54:15 AM: ▲ [WARNING] src/app/modules/landing/token-details/token-details.component.css exceeded maximum budget. Budget 3.00 kB was not met by 3.72 kB with a total of 6.72 kB.
10:54:15 AM: 
10:54:15 AM: 
10:54:15 AM: ▲ [WARNING] Module "quill" used by "node_modules/primeng/fesm2022/primeng-editor.mjs" is not ESM
10:54:15 AM: 
10:54:15 AM:   CommonJS or AMD dependencies can cause optimization bailouts.
10:54:15 AM:   For more information see: https://angular.io/guide/build#configuring-commonjs-dependencies
10:54:15 AM: 
10:54:15 AM: 
10:54:15 AM: ▲ [WARNING] Module "ethereum-blockies-base64" used by "src/app/services/ethereum-avatar.service.ts" is not ESM
10:54:15 AM: 
10:54:15 AM:   CommonJS or AMD dependencies can cause optimization bailouts.
10:54:15 AM:   For more information see: https://angular.io/guide/build#configuring-commonjs-dependencies
10:54:15 AM: 
10:54:15 AM: 
10:54:15 AM: ▲ [WARNING] 3 rules skipped due to selector errors:
10:54:15 AM:   swiper-container::part(pagination) -> Pseudo-elements are not supported by css-select
10:54:15 AM:   .form-floating>~label -> Did not expect successive traversals.
10:54:15 AM:   .form-floating>~label -> Did not expect successive traversals.
10:54:15 AM: 
10:54:15 AM: 
10:54:15 AM: ​
10:54:15 AM: (build.command completed in 29.3s)
10:54:15 AM: ​
10:54:15 AM: @netlify/plugin-angular-universal (onBuild event)             
10:54:15 AM: ────────────────────────────────────────────────────────────────
10:54:15 AM: ​
10:54:16 AM: Failed during stage "building site": Build script returned non-zero exit code: 2
10:54:16 AM: ​
10:54:16 AM: (@netlify/plugin-angular-universal onBuild completed in 62ms)
10:54:16 AM: ​
10:54:16 AM: @netlify/angular-runtime (onBuild event)                      
10:54:16 AM: ────────────────────────────────────────────────────────────────
10:54:16 AM: ​
10:54:16 AM: Writing Angular SSR Edge Function ...
10:54:16 AM: ​
10:54:16 AM: (@netlify/angular-runtime onBuild completed in 10ms)
10:54:16 AM: ​
10:54:16 AM: Functions bundling                                            
10:54:16 AM: ────────────────────────────────────────────────────────────────
10:54:16 AM: ​
10:54:16 AM: Packaging Functions from .netlify/functions-internal directory:
10:54:16 AM:  - angular-builder.js
10:54:16 AM: ​
10:54:16 AM: ✘ [ERROR] Could not resolve "../../dist/airdroppad/serverless/main"
10:54:16 AM:     .netlify/functions-internal/angular-builder.js:3:27:
10:54:16 AM:       3 │ const { render } = require("../../dist/airdroppad/serverless/main")
10:54:16 AM:         ╵                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10:54:16 AM: ​
10:54:16 AM: Dependencies installation error                               
10:54:16 AM: ────────────────────────────────────────────────────────────────
10:54:16 AM: ​
10:54:16 AM:   Error message
10:54:16 AM:   A Netlify Function failed to require one of its dependencies.
10:54:16 AM:   Please make sure it is present in the site"s top-level "package.json".
​
10:54:16 AM:   Build failed with 1 error:
10:54:16 AM:   .netlify/functions-internal/angular-builder.js:3:27: ERROR: Could not resolve "../../dist/airdroppad/serverless/main"
10:54:16 AM: ​
10:54:16 AM:   Resolved config
10:54:16 AM:   build:
10:54:16 AM:     command: npm run build
10:54:16 AM:     commandOrigin: config
10:54:16 AM:     environment:
10:54:16 AM:       - CI
10:54:16 AM:       - NPM_FLAGS
10:54:16 AM:     publish: /opt/build/repo/dist/airdroppad/browser
10:54:16 AM:     publishOrigin: config
10:54:16 AM:   functions:
10:54:16 AM:     "*":
10:54:16 AM:       included_files:
10:54:16 AM:         - dist/airdroppad/browser/index.html
10:54:16 AM:         - dist/airdroppad/browser/styles.css
10:54:16 AM:         - dist/airdroppad/browser/styles.css
10:54:16 AM:         - dist/airdroppad/browser/custom-theme.scss
10:54:16 AM:         - dist/airdroppad/browser/./node_modules/bootstrap/dist/css/bootstrap.min.css
10:54:16 AM:         - dist/airdroppad/browser/node_modules/primeng/resources/themes/lara-dark-teal/theme.css
10:54:16 AM:         - dist/airdroppad/browser/node_modules/primeng/resources/primeng.min.css
10:54:16 AM:         - dist/airdroppad/browser/node_modules/primeicons/primeicons.css
10:54:16 AM:         - dist/airdroppad/browser/node_modules/primeflex/primeflex.css
10:54:16 AM:       node_bundler: esbuild
10:54:16 AM:   plugins:
10:54:16 AM:     - inputs: {}
10:54:16 AM:       origin: ui
10:54:16 AM:       package: "@netlify/plugin-angular-universal"
10:54:16 AM:     - inputs: {}
10:54:16 AM:       origin: ui
10:54:16 AM:       package: "@netlify/plugin-lighthouse"
10:54:16 AM:     - inputs: {}
10:54:16 AM:       origin: config
10:54:16 AM:       package: "@netlify/angular-runtime"
10:54:16 AM:   redirects:
10:54:16 AM:     - from: /*
      status: 200
      to: /index.html
    - from: /*
      status: 200
      to: /.netlify/functions/angular-builder
  redirectsOrigin: inline
10:54:16 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
10:54:16 AM: Failing build: Failed to build site
10:54:17 AM: Finished processing build request in 1m1.815s

netlify.toml

[build]
  command = "npm run build"
  publish = "dist/airdroppad/browser"

[[plugins]]
  package="@netlify/angular-runtime"

[[redirects]]
  from = "/*"
  to = "/index.html"
  status = 200

plugin-angular-universal plugin is not added in package.json as well. it was directly enabled from given link.

i tried to replicate this same repository and build was successful because @netlify/plugin-angular-universal@1.0.1 plugin was not installed, so how can i remove angular-universal-build-plugin plugin

Please help, I am still facing this issue

Hey there,

I was able to reproduce this issue with not being able to remove the angular universal plugin once installed, and will open up a bug for this behaviour. In the meantime we’ve removed the plugin from your site manually. Once you redeploy it should be removed.

Thank you, now i am able to deploy the build.