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

Some frameworks fail to build with node lts (16.15.1) #1053

Closed
krausest opened this issue Jun 19, 2022 · 2 comments
Closed

Some frameworks fail to build with node lts (16.15.1) #1053

krausest opened this issue Jun 19, 2022 · 2 comments

Comments

@krausest
Copy link
Owner

Building react-focal fails for latest lts node v16.15.1 (npm v8.11.0) with the following error message:

BUILDING  [ 'keyed', 'react-focal' ]
rm -rf  yarn.lock dist elm-stuff bower_components node_modules output
npm ci && npm run build-prod
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @grammarly/focal@0.8.5
npm ERR! Found: @types/react@17.0.5
npm ERR! node_modules/@types/react
npm ERR!   dev @types/react@"17.0.5" from the root project
npm ERR!   @types/react@"*" from @types/react-dom@17.0.4
npm ERR!   node_modules/@types/react-dom
npm ERR!     dev @types/react-dom@"17.0.4" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @types/react@">= 16.9.11 < 17.0.0-0" from @grammarly/focal@0.8.5
npm ERR! node_modules/@grammarly/focal
npm ERR!   @grammarly/focal@"0.8.5" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: @types/react@16.14.28
npm ERR! node_modules/@types/react
npm ERR!   peer @types/react@">= 16.9.11 < 17.0.0-0" from @grammarly/focal@0.8.5
npm ERR!   node_modules/@grammarly/focal
npm ERR!     @grammarly/focal@"0.8.5" 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-06-19T14_28_15_175Z-debug-0.log

It works when switching back to node v16.13.2 (npm v8.1.2) .
How come?

@krausest
Copy link
Owner Author

This appears to be npm/cli#4998
I've added to the Dockerfile the following option:
RUN echo "legacy-peer-deps=true" >> /root/.npmrc

If you build locally you can use echo "legacy-peer-deps=true" >> ~/.npmrc

@krausest
Copy link
Owner Author

All frameworks build against current LTS

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

1 participant