ignite
ignite copied to clipboard
Doesn't work on latest npm
Click to expand
/home/quantum/.npm/_npx/e31027f3785124a8/node_modules/gluegun/build/index.js:13
throw up;
^
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
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.0" from @react-native-community/[email protected]
npm ERR! node_modules/@react-native-community/masked-view
npm ERR! @react-native-community/masked-view@"0.1.10" 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 /home/quantum/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/quantum/.npm/_logs/2021-08-24T14_57_43_808Z-debug.log
(Use `node --trace-uncaught ...` to show where the exception was thrown)
~/Desktop/projects took 2s ✗ npm -v
7.21.0
0 verbose cli [
0 verbose cli '/home/quantum/.fnm/node-versions/v16.7.0/installation/bin/node',
0 verbose cli '/home/quantum/.fnm/node-versions/v16.7.0/installation/bin/npm',
0 verbose cli 'install'
0 verbose cli ]
1 info using [email protected]
2 info using [email protected]
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 0ms
5 timing config:load:file:/home/quantum/.fnm/node-versions/v16.7.0/installation/lib/node_modules/npm/npmrc Completed in 1ms
6 timing config:load:builtin Completed in 1ms
7 timing config:load:cli Completed in 0ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:/home/quantum/Desktop/projects/PizzaApp/.npmrc Completed in 0ms
10 timing config:load:project Completed in 1ms
11 timing config:load:file:/home/quantum/.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:/home/quantum/.fnm/node-versions/v16.7.0/installation/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 1ms
17 timing config:load:setEnvs Completed in 0ms
18 timing config:load Completed in 4ms
19 timing npm:load:configload Completed in 4ms
20 timing npm:load:setTitle Completed in 0ms
21 timing npm:load:setupLog Completed in 0ms
22 timing config:load:flatten Completed in 2ms
23 timing npm:load:cleanupLog Completed in 1ms
24 timing npm:load:configScope Completed in 0ms
25 timing npm:load:projectScope Completed in 0ms
26 timing npm:load Completed in 8ms
27 timing arborist:ctor Completed in 0ms
28 timing arborist:ctor Completed in 0ms
29 timing idealTree:init Completed in 7ms
30 timing idealTree:userRequests Completed in 0ms
31 silly idealTree buildDeps
32 silly fetch manifest @react-native-async-storage/async-storage@^1.14.1
33 http fetch GET 200 https://registry.npmjs.org/@react-native-async-storage%2fasync-storage 789ms (cache miss)
34 silly fetch manifest [email protected]
35 http fetch GET 200 https://registry.npmjs.org/react-native 199ms (cache revalidated)
36 silly fetch manifest [email protected]
37 http fetch GET 200 https://registry.npmjs.org/react 191ms (cache revalidated)
38 silly fetch manifest @react-native-community/[email protected]
39 http fetch GET 200 https://registry.npmjs.org/@react-native-community%2fmasked-view 242ms (cache miss)
40 silly fetch manifest react@^16.0
41 timing idealTree Completed in 1452ms
42 timing command:install Completed in 1462ms
43 verbose stack Error: unable to resolve dependency tree
43 verbose stack at Arborist.[failPeerConflict] (/home/quantum/.fnm/node-versions/v16.7.0/installation/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1274:25)
43 verbose stack at Arborist.[loadPeerSet] (/home/quantum/.fnm/node-versions/v16.7.0/installation/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1241:34)
43 verbose stack at async Arborist.[buildDepStep] (/home/quantum/.fnm/node-versions/v16.7.0/installation/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:877:11)
43 verbose stack at async Arborist.buildIdealTree (/home/quantum/.fnm/node-versions/v16.7.0/installation/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:206:7)
43 verbose stack at async Promise.all (index 1)
43 verbose stack at async Arborist.reify (/home/quantum/.fnm/node-versions/v16.7.0/installation/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:147:5)
43 verbose stack at async Install.install (/home/quantum/.fnm/node-versions/v16.7.0/installation/lib/node_modules/npm/lib/install.js:150:5)
44 verbose cwd /home/quantum/Desktop/projects/PizzaApp
45 verbose Linux 5.11.0-7620-generic
46 verbose argv "/home/quantum/.fnm/node-versions/v16.7.0/installation/bin/node" "/home/quantum/.fnm/node-versions/v16.7.0/installation/bin/npm" "install"
47 verbose node v16.7.0
48 verbose npm v7.21.0
49 error code ERESOLVE
50 error ERESOLVE unable to resolve dependency tree
51 error
52 error While resolving: [email protected]
52 error Found: [email protected]
52 error node_modules/react
52 error react@"17.0.1" from the root project
52 error
52 error Could not resolve dependency:
52 error peer react@"^16.0" from @react-native-community/[email protected]
52 error node_modules/@react-native-community/masked-view
52 error @react-native-community/masked-view@"0.1.10" from the root project
52 error
52 error Fix the upstream dependency conflict, or retry
52 error this command with --force, or --legacy-peer-deps
52 error to accept an incorrect (and potentially broken) dependency resolution.
52 error
52 error See /home/quantum/.npm/eresolve-report.txt for a full report.
53 verbose exit 1
We'll take a look at this, @shirshak55 ! Thanks for reporting.
@shirshak55 Could you post the results of your npx ignite-cli doctor, please? I'm having trouble recreating this.
Here is the result of mine:
~/Code/rnlive
❯ ignite new Issue1777Expo --expo
· · · · · · · · · · · · · · · · · · 🔥 Ignite 🔥 · · · · · · · · · · · · · · · · · ·
█ Creating Issue1777Expo using Ignite 7.5.0
█ Powered by Infinite Red - https://infinite.red
█ Using expo-cli
█ Bundle identifier: com.Issue1777Expo
────────────────────────────────────────────────
🔥 Igniting app
🪔 Summoning Expo CLI
🎫 Cleaning up Expo install
🧶 Unboxing NPM dependencies
🗄 Backing everything up in source control
Ignite CLI ignited Issue1777Expo in 1162.53s
To get started:
cd Issue1777Expo
yarn start
Need additional help?
Join our Slack community at http://community.infinite.red.
Now get cooking! 🍽
· · · · · · · · · · · · · · · · · · 🔥 Ignite 🔥 · · · · · · · · · · · · · · · · · ·
~/Code/rnlive 19m 27s
❯ npx ignite-cli doctor
System
platform darwin
arch x64
cpu 16 cores Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
directory rnlive /Users/jh/Code/rnlive
JavaScript (and globally-installed packages)
node 16.4.2 /usr/local/bin/node
npm 7.21.1 /usr/local/bin/npm
appium-doctor 1.15.3
appium 1.17.1
expo-cli 4.9.1
npm 7.21.1
pure-prompt 1.11.0
yarn 1.22.11 /usr/local/bin/yarn
create-next-app 9.4.4
detox-cli 17.11.0
expo-cli 4.10.0
firebase-tools 9.3.0
ios-deploy 1.11.4
ts-node 8.8.2
typescript 3.8.2
vercel 21.3.3
ynpx 2.1.1
Ignite
ignite-cli 7.5.0 /Users/jh/.npm/_npx/e31027f3785124a8/node_modules/.bin/ignite
ignite src build /Users/jh/.npm/_npx/e31027f3785124a8/node_modules/ignite-cli/build
Android
java 1.8.0_232 /usr/bin/java
android home - /Users/jh/Library/Android/sdk
iOS
xcode 12.5.1
cocoapods 1.10.1 /usr/local/bin/pod
I'm able to reproduce the issue and have the following output when I tried npm install or ignite create AppName
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @types/[email protected]
npm ERR! node_modules/@types/jest
npm ERR! dev @types/jest@"^27.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional @types/jest@"^26.0.0" from [email protected]
npm ERR! node_modules/ts-jest
npm ERR! dev ts-jest@"^27.0.4" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @types/[email protected]
npm ERR! node_modules/@types/jest
npm ERR! peerOptional @types/jest@"^26.0.0" from [email protected]
npm ERR! node_modules/ts-jest
npm ERR! dev ts-jest@"^27.0.4" 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/andrew/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/andrew/.npm/_logs/2021-09-14T12_41_35_544Z-debug.log
For npm install I got around the error by using npm install --force. However when I tried to run ignite create AppName, I got the same error and couldn't override the npm install step to use the --force flag. I think some of the following dependencies are the ones I suspect needing to be upgraded or downgraded to resolve the version conflicts.
- @types/jest
- ts-jest
Environment:
System
platform darwin
arch x64
cpu 24 cores Intel(R) Xeon(R) CPU X5680 @ 3.33GHz
directory Dev /Users/andrew/Dev
JavaScript (and globally-installed packages)
node 14.17.1 /Users/andrew/.nvm/versions/node/v14.17.1/bin/node
npm 7.23.0 /Users/andrew/.nvm/versions/node/v14.17.1/bin/npm
appium-doctor 1.16.0
firebase-tools 9.18.0
mjpeg-consumer 2.0.0
npm 7.23.0
yarn - not installed
Ignite
ignite-cli 7.5.0 /Users/andrew/.npm/_npx/e31027f3785124a8/node_modules/.bin/ignite
ignite src build /Users/andrew/.npm/_npx/e31027f3785124a8/node_modules/ignite-cli/build
Android
java 16.0.2 /usr/local/opt/openjdk/bin/java
android home - /Users/andrew/Library/Android/sdk
iOS
xcode 12.5.1
cocoapods 1.10.1 /Users/andrew/.rvm/gems/ruby-3.0.0/bin/pod
@Andrewngabriel Are you for sure running ignite create? Because the proper command should be npx ignite-cli new MyApp.
If you're using the latter, someone in the Infinite Red Community reported that this command fixed it for them...oddly.
npx @react-native-community/cli doctor
I don't know why. :shrug:
Link to comment (will expire): https://infiniteredcommunity.slack.com/archives/C41PK1LAY/p1631412151028900
I was trying to run ignite new AppName when I got the error mentioned above.
Interesting enough, I just tried to run npx @react-native-community/cli doctor like you advised and got the following output:
⠸ Running diagnostics...
warn We couldn't find a package.json in this directory. Android SDK checks may fail. Doctor works best in a React Native project root.
Common
✓ Node.js
✖ yarn
- Version found: N/A
- Version supported: >= 1.10.x
✓ npm
✖ Watchman - Used for watching changes in the filesystem when in development mode
- Version found: 2021.08.30.00
- Version supported: 4.x
Android
✓ JDK
✓ Android Studio - Required for building and installing your app on Android
✖ Android SDK - Required for building and installing your app on Android
- Versions found: 28.0.3, 29.0.2, 29.0.3, 30.0.2, 30.0.3, 31.0.0
- Version supported: Not Found
✓ ANDROID_HOME
iOS
✓ Xcode - Required for building and installing your app on iOS
✓ CocoaPods - Required for installing iOS dependencies
✓ ios-deploy - Required for installing your app on a physical device with the CLI
Errors: 3
Warnings: 0
I pressed e to let the tool try and fix all the errors it flagged and it was able to fix obtaining yarn and Watchman but had some trouble with Android SDK
Attempting to fix 3 issues...
Common
✔ yarn
✔ Watchman
Android
✖ Android SDK
Read more about how to update Android SDK at https://developer.android.com/studio
Afterwards everything magically started working again though when I tried installing dependencies for this repo by running npm install, I got the following warning while installing packages.
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: @types/[email protected]
npm WARN node_modules/@types/jest
npm WARN dev @types/jest@"^27.0.1" from the root project
npm WARN
npm WARN Could not resolve dependency:
npm WARN peerOptional @types/jest@"^26.0.0" from [email protected]
npm WARN node_modules/ts-jest
npm WARN dev ts-jest@"^27.0.4" from the root project
npm WARN deprecated [email protected]: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
added 953 packages, and audited 1211 packages in 49s
100 packages are looking for funding
run `npm fund` for details
6 vulnerabilities (2 low, 2 moderate, 2 high)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
I think this issue might be caused due to not having a package-lock.json file so npm users fetch dependencies fresh each time they run npm install whereas with yarn, because you have a lock file, it can fetch packages in a more stable approach. Is there a reason for not having a package-lock.json?
Is there a reason for not having a package-lock.json?
Yeah -- it's because we only use yarn at Infinite Red. :-) (blog post)
I suppose we could detect whether yarn is available and include a package-lock.json if not, but I'm not a big fan of that. I'd prefer to not ship a lockfile at all, if we can help it.
Just wanted to add, for anyone running into this same issue. Deleting the folder containing the broken application, installing yarn and re-running the command will resolve the issue. Probably makes sense to just use yarn if the boilerplate you're relying on prefers it :).
Probably makes sense to just use yarn if the boilerplate you're relying on prefers it :).
New to ignite here, ran into the same issue, and I agree with your statement. Seems like ignite looks for yarn and uses it if available. I think suggesting to install via npx might be confusing (own its own). Maybe something like the following would be beneficial?
# recommend you have yarn installed
npx ignite-cli new IgniteTrivia # yarn 1
- or -
yarn dlx ignite-cli new IgniteTrivia # yarn 2
Also works if you have npm@6 installed instead of latest.
Duplicate of #1661
This is not a duplicate of 1661 if you look at the error closely. Closing this
Wait, I'm confused. 😕 If you think it's not a duplicate, why was it closed? This issue is still occurring to me, that's why I'm here in the first place.
@niieani the project doesn't seem to be active and it's already been more than 4 months so I don't want to pressure the maintainer.
@shirshak55 While I understand your frustration with an issue that hasn't been resolved in four months, I do take issue with the idea that the project isn't active. We've been working on it as time allows, and I have a PR in-progress that addresses both the NPM issue and also supports PNPM as well as Yarn and NPM.
https://github.com/infinitered/ignite/pull/1847
Taking a step back, my philosophy on open source is that I will try to review and merge/release PRs in a timely manner. But issues (especially problems with tools that I don't use myself) are generally on the community to figure out and solve. If you have a PR that solves your issue and it's been a while, I never mind you pinging me on Twitter and asking me to review it, etc.
I am not frustrated but delighted to hear the project is active. When I saw there are workarounds I closed them. As it is open-source it doesn't impact me if it's not maintained due to various circumstances. I made a spurious assumption so I take my words back regarding maintenance
I should have updated this thread, to be fair!
As an OSS maintainer myself, I know the struggle. Thank you is the word we don't hear enough, so: thank you!

There has been a lot of changes since this issue last had activity. This is going to be closed for now, but please re-open if this still needs attention.