JacopoPatroclo / nx-react-native-expo

Expo Managed Plugin for Nx
39 stars 18 forks source link

Cannot install with nx 11.4.0 #11

Open devcauldron opened 3 years ago

devcauldron commented 3 years ago

Here is the output I get when trying to install

git:(main) npm i -D nx-react-native-expo --force
npm WARN using --force Recommended protections disabled.
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react@17.0.1
npm WARN node_modules/react
npm WARN   peer react@">=16.0.0" from @ant-design/icons@4.5.0
npm WARN   node_modules/@ant-design/icons
npm WARN     @ant-design/icons@"^4.5.0" from antd@4.13.0
npm WARN     node_modules/antd
npm WARN   72 more (@emotion/core, @emotion/styled, @emotion/styled-base, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"16.13.1" from react-native@0.63.4
npm WARN node_modules/react-native
npm WARN   peer react-native@"^0.63.0" from nx-react-native-expo@0.0.9
npm WARN   node_modules/nx-react-native-expo
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: @nrwl/workspace@11.4.0
npm WARN node_modules/@nrwl/workspace
npm WARN   @nrwl/workspace@"11.4.0" from @nrwl/cypress@11.4.0
npm WARN   node_modules/@nrwl/cypress
npm WARN     @nrwl/cypress@"11.4.0" from @nrwl/react@11.4.0
npm WARN     node_modules/@nrwl/react
npm WARN     3 more (@nrwl/storybook, @nrwl/web, the root project)
npm WARN   5 more (@nrwl/react, @nrwl/storybook, @nrwl/web, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer @nrwl/workspace@"10.4.4" from @nrwl/jest@10.4.4
npm WARN node_modules/nx-react-native-expo/node_modules/@nrwl/jest
npm WARN   @nrwl/jest@"10.4.4" from nx-react-native-expo@0.0.9
npm WARN   node_modules/nx-react-native-expo
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: @nrwl/workspace@11.4.0
npm WARN node_modules/@nrwl/workspace
npm WARN   @nrwl/workspace@"11.4.0" from @nrwl/cypress@11.4.0
npm WARN   node_modules/@nrwl/cypress
npm WARN     @nrwl/cypress@"11.4.0" from @nrwl/react@11.4.0
npm WARN     node_modules/@nrwl/react
npm WARN     3 more (@nrwl/storybook, @nrwl/web, the root project)
npm WARN   5 more (@nrwl/react, @nrwl/storybook, @nrwl/web, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer @nrwl/workspace@"10.4.4" from @nrwl/jest@10.4.4
npm WARN node_modules/nx-react-native-expo/node_modules/@nrwl/jest
npm WARN   @nrwl/jest@"10.4.4" from nx-react-native-expo@0.0.9
npm WARN   node_modules/nx-react-native-expo
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: @nrwl/workspace@11.4.0
npm WARN node_modules/@nrwl/workspace
npm WARN   @nrwl/workspace@"11.4.0" from @nrwl/cypress@11.4.0
npm WARN   node_modules/@nrwl/cypress
npm WARN     @nrwl/cypress@"11.4.0" from @nrwl/react@11.4.0
npm WARN     node_modules/@nrwl/react
npm WARN     3 more (@nrwl/storybook, @nrwl/web, the root project)
npm WARN   5 more (@nrwl/react, @nrwl/storybook, @nrwl/web, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer @nrwl/workspace@"10.4.4" from @nrwl/linter@10.4.4
npm WARN node_modules/nx-react-native-expo/node_modules/@nrwl/linter
npm WARN   @nrwl/linter@"10.4.4" from nx-react-native-expo@0.0.9
npm WARN   node_modules/nx-react-native-expo
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: @nrwl/workspace@11.4.0
npm WARN node_modules/@nrwl/workspace
npm WARN   @nrwl/workspace@"11.4.0" from @nrwl/cypress@11.4.0
npm WARN   node_modules/@nrwl/cypress
npm WARN     @nrwl/cypress@"11.4.0" from @nrwl/react@11.4.0
npm WARN     node_modules/@nrwl/react
npm WARN     3 more (@nrwl/storybook, @nrwl/web, the root project)
npm WARN   5 more (@nrwl/react, @nrwl/storybook, @nrwl/web, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer @nrwl/workspace@"10.4.4" from @nrwl/linter@10.4.4
npm WARN node_modules/nx-react-native-expo/node_modules/@nrwl/linter
npm WARN   @nrwl/linter@"10.4.4" from nx-react-native-expo@0.0.9
npm WARN   node_modules/nx-react-native-expo
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: @nrwl/workspace@11.4.0
npm WARN node_modules/@nrwl/workspace
npm WARN   @nrwl/workspace@"11.4.0" from @nrwl/cypress@11.4.0
npm WARN   node_modules/@nrwl/cypress
npm WARN     @nrwl/cypress@"11.4.0" from @nrwl/react@11.4.0
npm WARN     node_modules/@nrwl/react
npm WARN     3 more (@nrwl/storybook, @nrwl/web, the root project)
npm WARN   5 more (@nrwl/react, @nrwl/storybook, @nrwl/web, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer @nrwl/workspace@"10.4.4" from @nrwl/react@10.4.4
npm WARN node_modules/nx-react-native-expo/node_modules/@nrwl/react
npm WARN   @nrwl/react@"10.4.4" from nx-react-native-expo@0.0.9
npm WARN   node_modules/nx-react-native-expo
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: @nrwl/workspace@11.4.0
npm WARN node_modules/@nrwl/workspace
npm WARN   @nrwl/workspace@"11.4.0" from @nrwl/cypress@11.4.0
npm WARN   node_modules/@nrwl/cypress
npm WARN     @nrwl/cypress@"11.4.0" from @nrwl/react@11.4.0
npm WARN     node_modules/@nrwl/react
npm WARN     3 more (@nrwl/storybook, @nrwl/web, the root project)
npm WARN   5 more (@nrwl/react, @nrwl/storybook, @nrwl/web, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer @nrwl/workspace@"10.4.4" from @nrwl/react@10.4.4
npm WARN node_modules/nx-react-native-expo/node_modules/@nrwl/react
npm WARN   @nrwl/react@"10.4.4" from nx-react-native-expo@0.0.9
npm WARN   node_modules/nx-react-native-expo
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: @nrwl/workspace@11.4.0
npm ERR! node_modules/@nrwl/workspace
npm ERR!   @nrwl/workspace@"11.4.0" from @nrwl/cypress@11.4.0
npm ERR!   node_modules/@nrwl/cypress
npm ERR!     @nrwl/cypress@"11.4.0" from @nrwl/react@11.4.0
npm ERR!     node_modules/@nrwl/react
npm ERR!       dev @nrwl/react@"^11.4.0" from the root project
npm ERR!     @nrwl/cypress@"11.4.0" from @nrwl/storybook@11.4.0
npm ERR!     node_modules/@nrwl/storybook
npm ERR!       @nrwl/storybook@"11.4.0" from @nrwl/react@11.4.0
npm ERR!       node_modules/@nrwl/react
npm ERR!         dev @nrwl/react@"^11.4.0" from the root project
npm ERR!       1 more (the root project)
npm ERR!     2 more (@nrwl/web, the root project)
npm ERR!   @nrwl/workspace@"11.4.0" from @nrwl/react@11.4.0
npm ERR!   node_modules/@nrwl/react
npm ERR!     dev @nrwl/react@"^11.4.0" from the root project
npm ERR!   4 more (@nrwl/storybook, @nrwl/web, the root project, nx-react-native-expo)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @nrwl/workspace@"10.4.4" from @nrwl/cypress@10.4.4
npm ERR! node_modules/nx-react-native-expo/node_modules/@nrwl/cypress
npm ERR!   @nrwl/cypress@"10.4.4" from @nrwl/react@10.4.4
npm ERR!   node_modules/nx-react-native-expo/node_modules/@nrwl/react
npm ERR!     @nrwl/react@"10.4.4" from nx-react-native-expo@0.0.9
npm ERR!     node_modules/nx-react-native-expo
npm ERR!       dev nx-react-native-expo@"*" 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 /Users/jeff/.npm/eresolve-report.txt for a full report.
devcauldron commented 3 years ago

I was able to get this package installed by passing the --legacy-peer-deps but when I try to use the generator it errors with the following:

git:(react-native) ✗ npx nx g nx-react-native-expo:app mobile
⠙ Installing packages (npm)...npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: tao-playground@0.0.0
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR!   react@"17.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"16.13.1" from react-native@0.63.2
npm ERR! node_modules/react-native
npm ERR!   react-native@"https://github.com/expo/react-native/archive/sdk-39.0.4.tar.gz" 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 /Users/jeff/.npm/eresolve-report.txt for a full report.
devcauldron commented 3 years ago

After digging in a little the problem seems to stem from a combination of factors:

It seems that until these other dependencies are cleared up, it's not possible to use npm 7 with nx packages using react-native