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

upgrade webpack peer dep to 5+ #273

Closed
eric-blue opened this issue Mar 29, 2021 · 2 comments
Closed

upgrade webpack peer dep to 5+ #273

eric-blue opened this issue Mar 29, 2021 · 2 comments

Comments

@eric-blue
Copy link

after running npm install I'm currently getting this error.

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! Found: webpack@5.28.0
npm ERR! node_modules/webpack
npm ERR!   dev webpack@"5.28.0" from the root project
npm ERR!   peer webpack@"^4.0.0 || ^5.0.0-rc.1" from @relative-ci/agent@1.5.0
npm ERR!   node_modules/@relative-ci/agent
npm ERR!     dev @relative-ci/agent@"1.5.0" from the root project
npm ERR!   6 more (babel-loader, directory-named-webpack-plugin, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer webpack@"^4.0.0" from grunt-webpack@4.0.2
npm ERR! node_modules/grunt-webpack
npm ERR!   dev grunt-webpack@"4.0.2" 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.

I wonder if allowing an additional v in the peer deps would do the trick? I'm not certain if npm is able to pickup the -rc.1 version as being the same as the following full release version

"peerDependencies": {
    "webpack": "^4.0.0 || ^5.0.0-rc.1" || "^5.0.0"
  }
@vio
Copy link
Member

vio commented Mar 29, 2021

Hi @eric-blue! ^4.0.0 || ^5.0.0-rc.1 will match all webpack 5 versions according to the semver rules. However, if you want to test it, try using @relative-ci/agent@1.5.1-beta.1.

Assuming that you are using npm v7 and peer dependencies are installed automatically, i think the error is pointing to grunt-webpack which is not supporting v5. You might be able to get the previous behaviour running npm install --legacy-peer-deps

@eric-blue
Copy link
Author

ah you're right, seems to be on my side. Thanks!

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