Skip to content

Conversation

pgrzeszczak
Copy link

In node 16 (npm 7) peer dependencies are automatically installed during npm install and it breaks fresh installation:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! Found: typescript@4.3.5
npm ERR! node_modules/typescript
npm ERR!   peer typescript@">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" from tsutils@3.21.0
npm ERR!   node_modules/tsutils
npm ERR!     tsutils@"^3.21.0" from @typescript-eslint/eslint-plugin@4.28.1
npm ERR!     node_modules/@typescript-eslint/eslint-plugin
npm ERR!       @typescript-eslint/eslint-plugin@"^4.5.0" from react-scripts@4.0.3
npm ERR!       node_modules/react-scripts
npm ERR!         react-scripts@"npm:@apptension/react-scripts" from the root project
npm ERR!       2 more (eslint-config-react-app, eslint-plugin-jest)
npm ERR!     tsutils@"^3.21.0" from @typescript-eslint/typescript-estree@4.28.1
npm ERR!     node_modules/@typescript-eslint/typescript-estree
npm ERR!       @typescript-eslint/typescript-estree@"4.28.1" from @typescript-eslint/parser@4.28.1
npm ERR!       node_modules/@typescript-eslint/parser
npm ERR!         @typescript-eslint/parser@"^4.5.0" from react-scripts@4.0.3
npm ERR!         node_modules/react-scripts
npm ERR!         2 more (@typescript-eslint/eslint-plugin, eslint-config-react-app)
npm ERR!       1 more (@typescript-eslint/experimental-utils)
npm ERR!   typescript@"^4.0" from @formatjs/ts-transformer@2.13.0
npm ERR!   node_modules/@formatjs/ts-transformer
npm ERR!     @formatjs/ts-transformer@"2.13.0" from babel-plugin-react-intl@8.2.25
npm ERR!     node_modules/babel-plugin-react-intl
npm ERR!       babel-plugin-react-intl@"^8.2.10" from react-scripts@4.0.3
npm ERR!       node_modules/react-scripts
npm ERR!         react-scripts@"npm:@apptension/react-scripts" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peerOptional typescript@"^3.2.1" from react-scripts@4.0.3
npm ERR! node_modules/react-scripts
npm ERR!   react-scripts@"npm:@apptension/react-scripts" 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! 

I've updated TS peer dependency to version ^4.0. I've also upgraded babel core package because of conflict with some dependency, that requires newer version.

@pgrzeszczak pgrzeszczak requested a review from pziemkowski July 5, 2021 12:51
@pgrzeszczak pgrzeszczak changed the title Fix dependencies for fresh npm install Fix dependencies for fresh npm install Jul 5, 2021
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

Successfully merging this pull request may close these issues.

1 participant