ignite: Error generating new app on Windows
Running ignite new ignite_app on windows produces the following error:
🔥 Igniting app
☕️ Baking CocoaPods
C:\Users\User\scoop\persist\nodejs-lts\bin\node_modules\ignite-cli\node_modules\gluegun\build\index.js:13
throw up;
^
yarn run v1.22.5
,error Command "format" not found.
,info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
(Use `node --trace-uncaught ...` to show where the exception was thrown)
Steps to reproduce
- Run:
ignite new ignite_app
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 5
- Comments: 34 (7 by maintainers)
Links to this issue
Commits related to this issue
- Fixes #1580 - yarn format double quoted instead of single quotes — committed to infinitered/ignite by jamonholmgren 3 years ago
- fix(windows): Fixes #1580 - yarn format uses double quoted instead of single quotes (#1593 by @jamonholmgren) [skip ci] — committed to infinitered/ignite by jamonholmgren 3 years ago
- chore(release): 6.1.1 [skip ci] ## [6.1.1](https://github.com/infinitered/ignite/compare/v6.1.0...v6.1.1) (2021-01-13) ### Bug Fixes * **windows:** Fix issue [#1579](https://github.com/infinitered/... — committed to infinitered/ignite by semantic-release-bot 3 years ago
Check which version of Nodejs you are using with running
node -vI was using Nodejs version 14.15.3 (LTS) and then updated to latest version (15.5.1 Current) and now problem solved for me. 😃I’ll keep doing research, but it looks like it’s spinning up new apps fine after the above fix.
@MLDMoritz please check if you have
react-native-cliinstalled by runningnpm list -g react-native-cliif so uninstall it bynpm uninstall react-native-cli. You should be good to go then.I was experiencing “throw up” issue too. I saw a comment earlier in the thread saying installing react-native-cli globally was not recommended. Once I removed it and reran npx --ignore-existing ignite-cli new myapp it worked as expected.
@jamonholmgren Using double quote instead of single (your commit) fixed this error 👍
@jamonholmgren I tried it again with Node 14 and its seems npm is what causing this problem! When I installed Node 15 npm v7.3.0 installed and it asked for installing new version 7.4.0, So I installed it globally. After reinstalling Node 14 creating new app didn’t have problem because of npm v7.4.0. Then I removed it and with version 6.14.10 the problem is back again
FYI – after the upgrade to 6.1.0, my issues were resolved and I was able to create apps very cleanly. No clue how it it behaving on a Windows machine though…
Yeah it’s a problem with the format script in package.json. Change the single quote into double quote, using escape like this
\"