Skip to content
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 install fails: ERESOLVE unable to resolve dependency tree #1149

Open
meowcat opened this issue Nov 26, 2021 · 2 comments
Open

npm install fails: ERESOLVE unable to resolve dependency tree #1149

meowcat opened this issue Nov 26, 2021 · 2 comments

Comments

@meowcat
Copy link

meowcat commented Nov 26, 2021

Hi,

I tested getting Visualizer to run in a Node docker:

docker run -it --rm -p 8080:80 -v $(pwd):/nodeapp node bash
# in the docker: 
cd /nodeapp
npm install

This results in the following error. I tried with images node and node:16.
Is this an obvious problem from my side?

root@96ac787d5393:/nodeapp# npm install
npm notice
npm notice New patch version of npm available! 8.1.2 -> 8.1.4
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.1.4
npm notice Run npm install -g npm@8.1.4 to update!
npm notice
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: visualizer@2.138.0
npm ERR! Found: grunt@1.4.1
npm ERR! node_modules/grunt
npm ERR!   dev grunt@"^1.0.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer grunt@"~0.4.1" from grunt-rename@0.1.4
npm ERR! node_modules/grunt-rename
npm ERR!   dev grunt-rename@"^0.1.4" 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/2021-11-26T13_31_41_404Z-debug.log
@stropitek
Copy link
Collaborator

npm8 became stricter with peer dependencies. You should use a flag that forces the installation or use npm6

@meowcat
Copy link
Author

meowcat commented Nov 27, 2021

Hi,

thanks. Is there a specific Node version this runs on? I now tried to install with npm install --force. This almost worked, I think, until in the end I got


> visualizer@2.138.0 postinstall
> npm run install-components && npm run install-browserified

npm WARN using --force Recommended protections disabled.
glob error [Error: EACCES: permission denied, scandir '/root/.npm/_logs'] {d.
  errno: -13,
  code: 'EACCES',
  syscall: 'scandir',
  path: '/root/.npm/_logs'
}
[..................] \ : WARN using --force Recommended protections disabled.
> visualizer@2.138.0 install-components
> bower install

/nodeapp/node_modules/bower/lib/node_modules/configstore/index.js:54disabled.
                                throw err;
                                ^

Error: EACCES: permission denied, open '/root/.config/configstore/bower-github.json'
You don't have access to this file.

    at Object.openSync (node:fs:585:3)
    at Object.readFileSync (node:fs:453:35)
    at Configstore.get (/nodeapp/node_modules/bower/lib/node_modules/configstore/index.js:35:26)
    at new Configstore (/nodeapp/node_modules/bower/lib/node_modules/configstore/index.js:28:45)
    at readCachedConfig (/nodeapp/node_modules/bower/lib/config.js:19:23)
    at defaultConfig (/nodeapp/node_modules/bower/lib/config.js:11:12)
    at Object.<anonymous> (/nodeapp/node_modules/bower/lib/index.js:16:32)
    at Module._compile (node:internal/modules/cjs/loader:1097:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1149:10)
    at Module.load (node:internal/modules/cjs/loader:975:32) {
  errno: -13,
  syscall: 'open',
  code: 'EACCES',
  path: '/root/.config/configstore/bower-github.json'
}

Node.js v17.1.0
npm ERR! code 1
npm ERR! path /nodeapp
npm ERR! command failed
npm ERR! command sh -c npm run install-components && npm run install-browserified

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-11-26T15_37_50_581Z-debug.log

I am root on docker here, so I don't get why I should have access problems.
(There are also some deprecation warnings, but I assume this is normal...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants