infinitered / ignite

Infinite Red's battle-tested React Native project boilerplate, along with a CLI, component/model generators, and more! 9 years of continuous development and counting.
MIT License
17.74k stars 1.4k forks source link

eslint-plugin-n, eslint-config-standard conflicting in Ignite X #2818

Closed StefanWallin closed 3 weeks ago

StefanWallin commented 1 month ago

Describe the bug

❯ npx ignite-cli@latest new RnExpoLiveActionsLab

✅ What bundle identifier? · se.stefan_wallin.lab
✅ Where do you want to start your project? · /Users/festiz/gitstuff/RnExpoLiveActionsLab
✅ How do you want to manage Native code? · Manual
✅ Do you want to initialize a git repository? (Y/n) · Yes
✅ Remove demo code? We recommend leaving it in if it's your first time using Ignite (y/N) · No
✅ Which package manager do you want to use? · npm
✅ Do you want to install dependencies? (Y/n) · Yes
✅ [Experimental] Expo Router for navigation? (y/N) · No
✅ [Experimental] the New Architecture? (y/N) · Yes

[...] 

The following error occurred:

    npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: rn-expo-live-actions-lab@0.0.1
npm error Found: eslint-plugin-n@17.11.1
npm error node_modules/eslint-plugin-n
npm error   dev eslint-plugin-n@"^17.10.2" from the root project
npm error
npm error Could not resolve dependency:
npm error peer eslint-plugin-n@"^15.0.0 || ^16.0.0 " from eslint-config-standard@17.1.0
npm error node_modules/eslint-config-standard
npm error   dev eslint-config-standard@"^17.1.0" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.

Ignite version

10.0.1

Additional info

❯ npx ignite-cli doctor
System
  platform           darwin
  arch               arm64
  cpu                10 cores     Apple M1 Pro
  directory          gitstuff     /Users/festiz/gitstuff
frankcalise commented 1 month ago

I guess for now cd into your directory and follow the npm install flag instructions it provides via --legacy-peer-deps.

This seems to be an open issue over at https://github.com/standard/eslint-config-standard/issues/412 and yarn must treat it differently.

Will discuss with @lindboe on how to fix this here, thanks for reporting

StefanWallin commented 1 month ago

Switching to yarn gave me more fun stuff to deal with on initialization 😅... Wondering if it has something to do with the fact I'm using asdf to manage node versions...

❯ npx ignite-cli@latest new RnExpoLiveActionsLab

✅ What bundle identifier? · se.stefan_wallin.lab
✅ Where do you want to start your project? · /Users/festiz/gitstuff/RnExpoLiveActionsLab
✅ How do you want to manage Native code? · Manual
✅ Do you want to initialize a git repository? (Y/n) · Yes
✅ Remove demo code? We recommend leaving it in if it's your first time using Ignite (y/N) · No
✅ Which package manager do you want to use? · yarn
✅ Do you want to install dependencies? (Y/n) · Yes
✅ [Experimental] Expo Router for navigation? (y/N) · No
✅ [Experimental] the New Architecture? (y/N) · Yes

[...]

The following error occurred:

    Error: Command failed: npx expo install --fix
npm warn exec The following package was not found and will be installed: expo@51.0.38
npm warn deprecated @babel/plugin-proposal-logical-assignment-operators@7.20.7: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-logical-assignment-operators instead.
npm warn deprecated rimraf@2.6.3: Rimraf versions prior to v4 are no longer supported
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.1.6: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.1.6: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.1.6: Glob versions prior to v9 are no longer supported
Warning: Root-level "expo" object found. Ignoring extra keys in Expo config: "name", "displayName", "ignite"
Learn more: https://expo.fyi/root-expo-object
Error: Error reading Expo config at /Users/festiz/gitstuff/RnExpoLiveActionsLab/app.config.ts:

Cannot find module 'ts-node/register'
Require stack:
- /Users/festiz/gitstuff/RnExpoLiveActionsLab/app.config.ts
- /Users/festiz/.npm/_npx/249ca9fcd30c476a/node_modules/@expo/config/build/evalConfig.js
- /Users/festiz/.npm/_npx/249ca9fcd30c476a/node_modules/@expo/config/build/getConfig.js
- /Users/festiz/.npm/_npx/249ca9fcd30c476a/node_modules/@expo/config/build/Config.js
- /Users/festiz/.npm/_npx/249ca9fcd30c476a/node_modules/@expo/config/build/index.js
- /Users/festiz/.npm/_npx/249ca9fcd30c476a/node_modules/@expo/cli/build/src/install/checkPackages.js
- /Users/festiz/.npm/_npx/249ca9fcd30c476a/node_modules/@expo/cli/build/src/install/installAsync.js
- /Users/festiz/.npm/_npx/249ca9fcd30c476a/node_modules/@expo/cli/build/src/install/index.js
- /Users/festiz/.npm/_npx/249ca9fcd30c476a/node_modules/@expo/cli/build/bin/cli
- /Users/festiz/.npm/_npx/249ca9fcd30c476a/node_modules/expo/bin/cli
Error: Error reading Expo config at /Users/festiz/gitstuff/RnExpoLiveActionsLab/app.config.ts:

Cannot find module 'ts-node/register'
Require stack:
- /Users/festiz/gitstuff/RnExpoLiveActionsLab/app.config.ts
- /Users/festiz/.npm/_npx/249ca9fcd30c476a/node_modules/@expo/config/build/evalConfig.js
- /Users/festiz/.npm/_npx/249ca9fcd30c476a/node_modules/@expo/config/build/getConfig.js
- /Users/festiz/.npm/_npx/249ca9fcd30c476a/node_modules/@expo/config/build/Config.js
- /Users/festiz/.npm/_npx/249ca9fcd30c476a/node_modules/@expo/config/build/index.js
- /Users/festiz/.npm/_npx/249ca9fcd30c476a/node_modules/@expo/cli/build/src/install/checkPackages.js
- /Users/festiz/.npm/_npx/249ca9fcd30c476a/node_modules/@expo/cli/build/src/install/installAsync.js
- /Users/festiz/.npm/_npx/249ca9fcd30c476a/node_modules/@expo/cli/build/src/install/index.js
- /Users/festiz/.npm/_npx/249ca9fcd30c476a/node_modules/@expo/cli/build/bin/cli
- /Users/festiz/.npm/_npx/249ca9fcd30c476a/node_modules/expo/bin/cli
    at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
    at Module._load (node:internal/modules/cjs/loader:986:27)
    at Module.require (node:internal/modules/cjs/loader:1233:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/Users/festiz/gitstuff/RnExpoLiveActionsLab/app.config.ts:7:1)
    at Module._compile (node:internal/modules/cjs/loader:1358:14)
    at requireFromString (/Users/festiz/.npm/_npx/249ca9fcd30c476a/node_modules/require-from-string/index.js:28:4)
    at evalConfig (/Users/festiz/.npm/_npx/249ca9fcd30c476a/node_modules/@expo/config/build/evalConfig.js:68:47)
    at readConfigFile (/Users/festiz/.npm/_npx/249ca9fcd30c476a/node_modules/@expo/config/build/getConfig.js:45:41)
    at getDynamicConfig (/Users/festiz/.npm/_npx/249ca9fcd30c476a/node_modules/@expo/config/build/getConfig.js:54:18)
shtefanilie commented 1 month ago

@StefanWallin I would recommend using pnpm. For me that worked fine :)

frankcalise commented 1 month ago

@StefanWallin I'm using asdf, what version of yarn are you trying?

infinitered-circleci commented 3 weeks ago

:tada: This issue has been resolved in version 10.0.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: