Open AlissonRS opened 3 years ago
I'm getting this same exception in my GitLab CI, running ng build
This error goes away and build succeeds if I switch to shared runners. This error occurs if I run the job on my own runner (the server is located in Germany, IDK if relevant)
$ ng build
Node.js version v17.2.0 detected.
Odd numbered Node.js versions will not enter LTS status and should not be used for production. For more information, please see https://nodejs.org/en/about/releases/.
An unhandled exception occurred: Cannot find module 'ngx-build-plus/package.json'
Require stack:
- /usr/local/lib/node_modules/@angular/cli/node_modules/@angular-devkit/architect/node/node-modules-architect-host.js
- /usr/local/lib/node_modules/@angular/cli/node_modules/@angular-devkit/architect/node/index.js
- /usr/local/lib/node_modules/@angular/cli/models/architect-command.js
- /usr/local/lib/node_modules/@angular/cli/commands/build-impl.js
- /usr/local/lib/node_modules/@angular/cli/node_modules/@angular-devkit/schematics/tools/export-ref.js
- /usr/local/lib/node_modules/@angular/cli/node_modules/@angular-devkit/schematics/tools/index.js
- /usr/local/lib/node_modules/@angular/cli/utilities/json-schema.js
- /usr/local/lib/node_modules/@angular/cli/models/command-runner.js
- /usr/local/lib/node_modules/@angular/cli/lib/cli/index.js
- /usr/local/lib/node_modules/@angular/cli/lib/init.js
See "/tmp/ng-alCDEM/angular-errors.log" for further details.
ng build
passes on that DE server if I run everything manually (docker run -it my-image sh, git clone, npm install, ng build)
Turns out I just needed an additional npm install
before the ng build
. Perhaps I've made some typo in my .gitlab-ci.yml that ended up in artifacts not being transferred between jobs...
Having the same issue. Anybody figure out how to sort this out? Is it possible to use this library with yarn
and without nx
?
Have you tried redownloading dependencies? A clean npm install
worked for me.
Have you tried redownloading dependencies? A clean
npm install
worked for me. The same worked for me too. Thank you!
I did npm i --legacy-peer-deps and then ng build but still getting the error. What can be the issue?
Trying to use it in an Angular 12 app, but I get the error below when running
ng serve
:What could be possibly wrong? Seems like an issue with path/folder structure that is making the customer builder not to find the
package.json
file (though it exists).