-
Notifications
You must be signed in to change notification settings - Fork 594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
npm ERR! code ERESOLVE #509
Comments
I ran into the same issues. Reading the failure messages points towards node version conflicts. But there is a simple resolution: build the docker but use node:12 Modify the Dockerfile in the root accordingly in line 3
Then you will be able to point your browser to http://0.0.0.0:4200 |
Thanks for that information. I have tried the workaround as described but I am still receiving the same error as described below. I suppose it could have to do with the Lockfile version but I didn't think that would create such an error: charcoal@ubuntu-latest:~/attack-navigator$ cat Dockerfile Build stageFROM node:12 WORKDIR /src copy over needed filesCOPY nav-app/ /src/nav-app/ WORKDIR /src/nav-app give user permissionsRUN chown -R node:node ./ install packages and buildRUN npm install --unsafe-perm EXPOSE 4200 CMD npm start USER node npm ERR! code ECONNREFUSED npm ERR! A complete log of this run can be found in: |
Might it be, that you try to build behind a proxy or firewall? |
I faced the same issue but was able to resolve it using a few workarounds. Downgrading to
Pinning Angular CLI to the highest compatible version (at the time of writing that seems to be 13.3.0, source) will get us one step further but eventually failed with For the sake of completeness, my working Dockerfile looks something like this now:
Fixing the root cause is probably a better idea though. |
Has there been anything new regarding this? I am not using Docker, just following documentation instructions as before. I am also having similar problems getting this project up and running within out class environment. We have an older version (offline) we are still able to use. I've been asked to create a new install of Navigator & Website and I am also having similar problems as described above. Thanks for any information to help get this resolved, work-around or otherwise! :-) |
Whether trying to build the web app directly and running into errors with ng serve & ng build OR trying to build a docker image - the outdated versions of angularcli and peer dependencies within npm are not compatible with more recent versions.
I have been bouncing around with this for a couple days now, so I don't have all of the different errors or workarounds that were attempted, but hoping someone can provide guidance.
Docker
charcoal@tesbuntu:~/attack-navigator$ sudo docker build .
[sudo] password for charcoal:
Sending build context to Docker daemon 39.76MB
Step 1/11 : FROM node:16
16: Pulling from library/node
b6d6a76ebdbe: Pull complete
6a6315e89337: Pull complete
4ad12dd0da3e: Pull complete
08a0ceb4387f: Pull complete
2a0ae5ed3318: Pull complete
63930fd517b3: Pull complete
4bb5869b822e: Pull complete
a1ec7ad8846f: Pull complete
c6db94ff9d66: Pull complete
Digest: sha256:b35e76ba744a975b9a5428b6c3cde1a1cf0be53b246e1e9a4874f87034222b5a
Status: Downloaded newer image for node:16
---> 946ee375d0e0
Step 2/11 : WORKDIR /src
---> Running in 0ecedcd07017
Removing intermediate container 0ecedcd07017
---> a04033500cd0
Step 3/11 : COPY nav-app/ /src/nav-app/
---> 1c35db8aadcb
Step 4/11 : COPY layers/*.md /src/layers/
---> 230ee6802f0a
Step 5/11 : COPY .md /src/
---> e305a31fcc00
Step 6/11 : WORKDIR /src/nav-app
---> Running in 69b13eb2a619
Removing intermediate container 69b13eb2a619
---> 3d4b514548ba
Step 7/11 : RUN chown -R node:node ./
---> Running in bd4ca4dcb594
Removing intermediate container bd4ca4dcb594
---> c24e82fe7284
Step 8/11 : RUN npm install --unsafe-perm
---> Running in 3702588eb9ae
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @angular-devkit/[email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/karma
npm ERR! dev karma@"~5.0.0" from the root project
npm ERR! peer karma@"" from [email protected]
npm ERR! node_modules/karma-jasmine
npm ERR! dev karma-jasmine@"~4.0.0" from the root project
npm ERR! peer karma-jasmine@">=1.1" from [email protected]
npm ERR! node_modules/karma-jasmine-html-reporter
npm ERR! dev karma-jasmine-html-reporter@"^1.5.0" from the root project
npm ERR! 1 more (karma-jasmine-html-reporter)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional karma@"~5.1.0" from @angular-devkit/[email protected]
npm ERR! node_modules/@angular-devkit/build-angular
npm ERR! dev @angular-devkit/build-angular@"~0.1100.3" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/karma
npm ERR! peerOptional karma@"~5.1.0" from @angular-devkit/[email protected]
npm ERR! node_modules/@angular-devkit/build-angular
npm ERR! dev @angular-devkit/build-angular@"~0.1100.3" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /root/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-10-13T12_56_44_523Z-debug-0.log
The command '/bin/sh -c npm install --unsafe-perm' returned a non-zero code: 1
charcoal@tesbuntu:~/attack-navigator$
WebServer
charcoal@tesbuntu:~/attack-navigator/nav-app$ npm install
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@angular-devkit/[email protected]',
npm WARN EBADENGINE required: { node: '>= 10.13.0', npm: '^6.11.0 || ^7.5.6', yarn: '>= 1.13.0' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@angular-devkit/[email protected]',
npm WARN EBADENGINE required: { node: '>= 10.13.0', npm: '^6.11.0 || ^7.5.6', yarn: '>= 1.13.0' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@angular/[email protected]',
npm WARN EBADENGINE required: { node: '>= 10.13.0', npm: '^6.11.0 || ^7.5.6', yarn: '>= 1.13.0' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@angular-devkit/[email protected]',
npm WARN EBADENGINE required: { node: '>= 10.13.0', npm: '^6.11.0 || ^7.5.6', yarn: '>= 1.13.0' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@angular-devkit/[email protected]',
npm WARN EBADENGINE required: { node: '>= 10.13.0', npm: '^6.11.0 || ^7.5.6', yarn: '>= 1.13.0' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@schematics/[email protected]',
npm WARN EBADENGINE required: { node: '>= 10.13.0', npm: '^6.11.0 || ^7.5.6', yarn: '>= 1.13.0' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@angular-devkit/[email protected]',
npm WARN EBADENGINE required: { node: '>= 10.13.0', npm: '^6.11.0 || ^7.5.6', yarn: '>= 1.13.0' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@schematics/[email protected]',
npm WARN EBADENGINE required: { node: '>= 10.13.0', npm: '^6.11.0 || ^7.5.6', yarn: '>= 1.13.0' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@angular-devkit/[email protected]',
npm WARN EBADENGINE required: { node: '>= 10.13.0', npm: '^6.11.0 || ^7.5.6', yarn: '>= 1.13.0' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '0.10 || 0.12 || 4 || 5 || 6' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '>= 14' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated [email protected]: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (debug-js/debug#797)
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (debug-js/debug#797)
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (debug-js/debug#797)
npm WARN deprecated [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated @schematics/[email protected]: This was an internal-only Angular package up through Angular v11 which is no longer used or maintained. Upgrade Angular to v12+ to remove this dependency.
npm WARN deprecated @angular/[email protected]: Package no longer supported. Use @angular/common instead, see https://angular.io/guide/deprecations#angularhttp
npm WARN deprecated [email protected]: TSLint has been deprecated in favor of ESLint. Please see palantir/tslint#4534 for more information.
npm WARN deprecated [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
patching node_modules/@angular-devkit/build-angular/src/webpack/configs/browser.js
postinstall completed successfully
added 1685 packages, and audited 1686 packages in 2m
111 packages are looking for funding
run
npm fund
for details37 vulnerabilities (2 low, 6 moderate, 29 high)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run
npm audit
for details.charcoal@tesbuntu:
/attack-navigator/nav-app$ ng serve/attack-navigator/nav-app$ npm install @angular/cliCommand 'ng' not found, but can be installed with:
sudo apt install ng-common
charcoal@tesbuntu:
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '0.10 || 0.12 || 4 || 5 || 6' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '>= 14' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN deprecated @schematics/[email protected]: This was an internal-only Angular package up through Angular v11 which is no longer used or maintained. Upgrade Angular to v12+ to remove this dependency.
added 3 packages, removed 8 packages, changed 15 packages, and audited 1681 packages in 11s
111 packages are looking for funding
run
npm fund
for details37 vulnerabilities (2 low, 6 moderate, 29 high)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run
npm audit
for details.charcoal@tesbuntu:
/attack-navigator/nav-app$ ng serve/attack-navigator/nav-app$ ng serveCommand 'ng' not found, but can be installed with:
sudo apt install ng-common
charcoal@tesbuntu:
The text was updated successfully, but these errors were encountered: