react-native-boilerplate
react-native-boilerplate copied to clipboard
[BUG]: Issue while running command npx react-native init MyApp --template @thecodingmachine/react-native-boilerplate
react-native environment setup
- [x] I verified that I have not react-native-cli installed globally and be up to date about the React Native environment setup.
Description
[1/2] Removing module react-native-template-@thecodingmachine/react-native-boilerplate... error This module isn't specified in a package.json file. info Visit https://yarnpkg.com/en/docs/cli/remove for documentation about this command. warn Failed to clean up template temp files in node_modules/react-native-template-@thecodingmachine/react-native-boilerplate. This is not a critical error, you can work on your app. D:\Repo\TIDispense\TIDispense\node_modules\metro-hermes-compiler\src\emhermesc.js:77 throw ex; ^
RuntimeError: abort(Error: ENOENT: no such file or directory, lstat 'D:\Repo\TIDispense\TIDispense\node_modules\react-native-template-@thecodingmachine\react-native-boilerplate'). Build with -s ASSERTIONS=1 for more info. at process.abort (D:\Repo\TIDispense\TIDispense\node_modules\metro-hermes-compiler\src\emhermesc.js:440:13) at process.emit (events.js:375:28) at processPromiseRejections (internal/process/promises.js:245:33) at processTicksAndRejections (internal/process/task_queues.js:96:32)
Version
latest
On which OS this issue appear on?
- [ ] IOS
- [X] Android
Desktop OS
Windows 10
Are you sure you don't have react-native cli installed globally ? this error is generally due to this. that's why I create the checkbox I verified that I have not react-native-cli installed globally and be up to date about the React Native environment setup.
on bug submissions. You can look at these issues
Same for me as well
✔ Downloading template
✔ Copying template
✔ Processing template
✔ 📘 Using typescript ? (y/N)
… yes
⠦ Executing post init script node:internal/process/promises:246
triggerUncaughtException(err, true /* fromPromise */);
^
[Error: ENOENT: no such file or directory, scandir './node_modules/@thecodingmachine/rnb-plugin-typescript/template/'] {
errno: -2,
code: 'ENOENT',
syscall: 'scandir',
path: './node_modules/@thecodingmachine/rnb-plugin-typescript/template/'
}
Node.js v17.2.0
✖ Executing post init script
error Error: Command failed: /var/folders/rz/2p31mx9s0mz712tgtf5dbmv00000gn/T/rncli-init-template-7GRvys/node_modules/@thecodingmachine/react-native-boilerplate/post-init.script.js
-
react-native-cli
is not installed. - Node:
v17.2.0
Same problem as above
What is your version of NodeJS? We found some unexpected issues with node 16 and node 17 so I encourage using nodeJS 14 and tell me if it's better !
same issue
same issue
Please give me at least your yarn version and your node version + the printed error
yarn: 1.22.17 node: v14.19.1
ying@YingdeiMac ~ % npx react-native init MyApp --template @thecodingmachine/react-native-boilerplate
This will walk you through creating a new React Native project in /Users/ying/MyApp
Using yarn v1.22.17
Installing react-native...
yarn add v1.22.17
info No lockfile found.
[1/4] 🔍 Resolving packages...
warning react-native > @react-native-community/cli > @react-native-community/cli-plugin-metro > metro > metro-minify-uglify > [email protected]: support for ECMAScript is superseded by `uglify-js` as of v3.13.0
warning react-native > react-native-codegen > jscodeshift > micromatch > snapdragon > [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
warning react-native > react-native-codegen > jscodeshift > micromatch > snapdragon > source-map-resolve > [email protected]: https://github.com/lydell/resolve-url#deprecated
warning react-native > react-native-codegen > jscodeshift > micromatch > snapdragon > source-map-resolve > [email protected]: See https://github.com/lydell/source-map-url#deprecated
warning react-native > react-native-codegen > jscodeshift > micromatch > snapdragon > source-map-resolve > [email protected]: Please see https://github.com/lydell/urix#deprecated
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning "react-native > [email protected]" has unmet peer dependency "@babel/core@*".
warning "react-native > [email protected]" has unmet peer dependency "react@^16.0.0 || ^17.0.0".
warning "react-native > [email protected]" has unmet peer dependency "react@^16.8.0 || ^17.0.0".
warning "react-native > react-native-codegen > [email protected]" has unmet peer dependency "@babel/preset-env@^7.1.6".
warning " > [email protected]" has unmet peer dependency "[email protected]".
[4/4] 🔨 Building fresh packages...
success Saved lockfile.
warning Your current version of Yarn is out of date. The latest version is "1.22.19", while you're on "1.22.17".
info To upgrade, run the following command:
$ brew upgrade yarn
success Saved 380 new dependencies.
info Direct dependencies
└─ [email protected]
info All dependencies
├─ @ampproject/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @hapi/[email protected]
├─ @jest/[email protected]
├─ @jridgewell/[email protected]
├─ @jridgewell/[email protected]
├─ @jridgewell/[email protected]
├─ @react-native-community/[email protected]
├─ @react-native-community/[email protected]
├─ @react-native-community/[email protected]
├─ @react-native-community/[email protected]
├─ @react-native-community/[email protected]
├─ @react-native-community/[email protected]
├─ @react-native/[email protected]
├─ @react-native/[email protected]
├─ @react-native/[email protected]
├─ @sideway/[email protected]
├─ @sideway/[email protected]
├─ @sideway/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
✨ Done in 41.99s.
info Setting up new React Native app in /Users/ying/MyApp
info Fetching template react-native-template-@thecodingmachine/react-native-boilerplate...
(node:3122) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
yarn add v1.22.17
[1/4] 🔍 Resolving packages...
warning @react-native-community/eslint-config > [email protected]: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
warning babel-jest > @jest/transform > jest-haste-map > [email protected]: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning "react-native > react-native-codegen > [email protected]" has unmet peer dependency "@babel/preset-env@^7.1.6".
warning "@react-native-community/eslint-config > @typescript-eslint/eslint-plugin > [email protected]" has unmet peer dependency "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".
[4/4] 🔨 Building fresh packages...
success Saved lockfile.
success Saved 215 new dependencies.
info Direct dependencies
├─ @react-native-community/[email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
info All dependencies
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @bcoe/[email protected]
├─ @cnakazawa/[email protected]
├─ @eslint/[email protected]
├─ @humanwhocodes/[email protected]
├─ @humanwhocodes/[email protected]
├─ @istanbuljs/[email protected]
├─ @jest/[email protected]
├─ @jest/[email protected]
├─ @jest/[email protected]
├─ @react-native-community/[email protected]
├─ @react-native-community/[email protected]
├─ @sinonjs/[email protected]
├─ @sinonjs/[email protected]
├─ @thecodingmachine/[email protected]
├─ @tootallnate/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @typescript-eslint/[email protected]
├─ @typescript-eslint/[email protected]
├─ @typescript-eslint/[email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
✨ Done in 37.38s.
yarn remove v1.22.17
[1/2] 🗑 Removing module react-native-template-@thecodingmachine/react-native-boilerplate...
error This module isn't specified in a package.json file.
info Visit https://yarnpkg.com/en/docs/cli/remove for documentation about this command.
warn Failed to clean up template temp files in node_modules/react-native-template-@thecodingmachine/react-native-boilerplate. This is not a critical error, you can work on your app.
/Users/ying/MyApp/node_modules/metro-hermes-compiler/src/emhermesc.js:77
throw ex;
^
RuntimeError: abort(Error: ENOENT: no such file or directory, lstat '/Users/ying/MyApp/node_modules/react-native-template-@thecodingmachine/react-native-boilerplate'). Build with -s ASSERTIONS=1 for more info.
at process.abort (/Users/ying/MyApp/node_modules/metro-hermes-compiler/src/emhermesc.js:402:15)
at process.emit (events.js:400:28)
at processPromiseRejections (internal/process/promises.js:245:33)
at processTicksAndRejections (internal/process/task_queues.js:96:32)
Can you run react-native -v
and send me the result please ?
Have the same problem
- First, remove
react-native-cli
global. - Second, run
npm install @react-native-community/cli
- Third, run
react-native init Boilerplate --template @thecodingmachine/react-native-boilerplate --skip-install
.
Maybe can solve.
@liujb I recommend to not reinstall the cli, like it's recommended in the documentation and use the npx
command. Like this you will use the lastest version of the cli
+1
Same issue, but I have another issue also, which command is to create react-native-boilerplate
with typescript
?
@GezimVeliu what happen if you run react-native -v
?
If you want to use typescript you have to run the same cmd and a prompt will be displayed.
Hi, I have the same issue since 3 months.
Node version: v14.18.1
` √ Downloading template √ Copying template √ Processing template √ 📘 Using typescript ? (y/N)
... yes / Executing post init script Error: Sorry, an error occurred reading: ./node_modules/@thecodingmachine/rnb-plugin-typescript/template/ at onEachFiles (C:\Users\CHEIKH~1.DIE\AppData\Local\Temp\rncli-init-template-LMj3hC\node_modules@thecodingmachine\rnb-toolbox\dist\utils.js:50:31) at async Object.plugin.lifecycle.onInstall (C:\Users\CHEIKH~1.DIE\AppData\Local\Temp\rncli-init-template-LMj3hC\node_modules@thecodingmachine\rnb-plugin-typescript\index.js:19:3) at async RNBPlugin.apply (C:\Users\CHEIKH~1.DIE\AppData\Local\Temp\rncli-init-template-LMj3hC\node_modules@thecodingmachine\rnb-toolbox\dist\index.js:46:21) at async applyPlugin (C:\Users\CHEIKH~1.DIE\AppData\Local\Temp\rncli-init-template-LMj3hC\node_modules@thecodingmachine\react-native-boilerplate\template\plugins\index.js:22:3)
TheCodingMachine React-Native Boilerplate initialized with success ! `
Version latest
On which OS this issue appear on?
- IOS
- Android
Desktop OS Windows 11
@JeremyDolle my version is not figurated cause haven't been installed globally, react-native -v nothing happened.
But for me it worked only after installing the npx i -g @react-native-community/[email protected]
.
-
npx i -g @react-native-community/cli
-
npx react-native init bonc --template @thecodingmachine/react-native-boilerplate
Worked
Ok...I don't know why because if you don't have the react-native-cli installed globally and run npx react-native init
, it will install the right version of the CLI based on the react native version of the template. It's well explained in the documentation.
A lot of issues can appears if you don't use the right version of the CLI... by installing it globally you will have to check the cli version before using a template and re-install the right CLI version compatible with the react-native version...
I don't think it's the easiest way to maintain projects.
What node version do you use ?
@JeremyDolle I appreciate your fast response.
C:\Users\Gezim>node -v
v14.17.6
C:\Users\Gezim>npm -v
6.14.15
C:\Users\Gezim>react-native --version
8.0.2
Now for me is everything okay, it is working
this template still fail to creat a new project in Aug 2022. here is my error:
npx react-native init ZetaChatApp --template @thecodingmachine/react-native-boilerplate
###### ######
### #### #### ###
## ### ### ##
## #### ##
## #### ##
## ## ## ##
## ### ### ##
## ######################## ##
###### ### ### ######
### ## ## ## ## ###
### ## ### #### ### ## ###
## #### ######## #### ##
## ### ########## ### ##
## #### ######## #### ##
### ## ### #### ### ## ###
### ## ## ## ## ###
###### ### ### ######
## ######################## ##
## ### ### ##
## ## ## ##
## #### ##
## #### ##
## ### ### ##
### #### #### ###
###### ######
Welcome to React Native!
Learn once, write anywhere
✔ Downloading template
✔ Copying template
✔ Processing template
ℹ Executing post init script
✔ 📘 Using typescript ? (y/N)
… yes
Error: Command failed: yarn remove @thecodingmachine/rnb-plugin-typescript
error This module isn't specified in a package.json file.
at checkExecSyncError (node:child_process:828:11)
at execSync (node:child_process:899:15)
at RNBPlugin.apply (/private/var/folders/5t/pyldrlys2bx3gltdbnh042v80000gn/T/rncli-init-template-dnbD6K/node_modules/@thecodingmachine/rnb-toolbox/dist/index.js:48:56)
at async applyPlugin (/private/var/folders/5t/pyldrlys2bx3gltdbnh042v80000gn/T/rncli-init-template-dnbD6K/node_modules/@thecodingmachine/react-native-boilerplate/template/plugins/index.js:22:3) {
status: 1,
signal: null,
output: [
null,
<Buffer 79 61 72 6e 20 72 65 6d 6f 76 65 20 76 31 2e 32 32 2e 31 39 0a 5b 31 2f 32 5d 20 52 65 6d 6f 76 69 6e 67 20 6d 6f 64 75 6c 65 20 40 74 68 65 63 6f 64 ... 124 more bytes>,
<Buffer 65 72 72 6f 72 20 54 68 69 73 20 6d 6f 64 75 6c 65 20 69 73 6e 27 74 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 61 20 70 61 63 6b 61 67 65 2e 6a 73 6f ... 8 more bytes>
],
pid: 9430,
stdout: <Buffer 79 61 72 6e 20 72 65 6d 6f 76 65 20 76 31 2e 32 32 2e 31 39 0a 5b 31 2f 32 5d 20 52 65 6d 6f 76 69 6e 67 20 6d 6f 64 75 6c 65 20 40 74 68 65 63 6f 64 ... 124 more bytes>,
stderr: <Buffer 65 72 72 6f 72 20 54 68 69 73 20 6d 6f 64 75 6c 65 20 69 73 6e 27 74 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 61 20 70 61 63 6b 61 67 65 2e 6a 73 6f ... 8 more bytes>
}
TheCodingMachine React-Native Boilerplate initialized with success ! 🚀
.-` `::
`///////////// `/shhhy+- ://. /sy/ /ss/ :NMN:
`sssssyhhhyhhy:` `yMMMMNNMMMd. osss: `hMMMh- .-` `+ss: +MMm/.
:MMM+----. `mMMm+:-`.oo/` osssyo` `dMMMMh- ohhh- `oyy+- sMMd/.
:MMM+` oMMN/- osssyhs`.mMMMMMh- -hds` .syy+- `hMMh:`
:MMM+` hMMd: oss-ohhhMMMhdMMh- `. +NNm/. .dMMy:`
:MMM+` oMMN/ oss-`shdMMd:dMMh- :-` sMMd/. -NMMo-
:MMM+` `mMMm/` `/+:. oss- `sdMd:.hMMh- hMys- `hMMh:` -hdy-`
:MMM+` `yMMMMdssss+ oss. `oh/- hMMh- -hyo: dMMs:` -ss+`
.oys:` .+yhyo/- -::` `` -syo- ..` +mo- `//
`` ``` `` `.
- 📚 If you need to read more about this boilerplate : https://thecodingmachine.github.io/react-native-boilerplate/
- 🤕 If you have some troubles : https://github.com/thecodingmachine/react-native-boilerplate/issues
- ⭐ If you love this boilerplate, give us a star, you will be a ray of sunshine in our lives :) https://github.com/thecodingmachine/react-native-boilerplate
✖ Installing CocoaPods dependencies (this may take a few minutes)
✖ Installing CocoaPods dependencies (this may take a few minutes)
error Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template.
Please try again manually: "cd ./ZetaChatApp/ios && pod install".
CocoaPods documentation: https://cocoapods.org/
@jeremyspritelyco did you fix it? i have same problem. and i can't get latest version of boilerplate, i alway got 3.3.0
my env is ➜ Projects git:(master) ✗ npm -v 8.13.2 ➜ Projects git:(master) ✗ node -v v16.15.0 ➜ Projects git:(master) ✗ react-native --version 8.0.2
can anyone help me to get lastest boilerplate?
this template still fail to creat a new project in Aug 2022. here is my error:
npx react-native init ZetaChatApp --template @thecodingmachine/react-native-boilerplate ###### ###### ### #### #### ### ## ### ### ## ## #### ## ## #### ## ## ## ## ## ## ### ### ## ## ######################## ## ###### ### ### ###### ### ## ## ## ## ### ### ## ### #### ### ## ### ## #### ######## #### ## ## ### ########## ### ## ## #### ######## #### ## ### ## ### #### ### ## ### ### ## ## ## ## ### ###### ### ### ###### ## ######################## ## ## ### ### ## ## ## ## ## ## #### ## ## #### ## ## ### ### ## ### #### #### ### ###### ###### Welcome to React Native! Learn once, write anywhere ✔ Downloading template ✔ Copying template ✔ Processing template ℹ Executing post init script ✔ 📘 Using typescript ? (y/N) … yes Error: Command failed: yarn remove @thecodingmachine/rnb-plugin-typescript error This module isn't specified in a package.json file. at checkExecSyncError (node:child_process:828:11) at execSync (node:child_process:899:15) at RNBPlugin.apply (/private/var/folders/5t/pyldrlys2bx3gltdbnh042v80000gn/T/rncli-init-template-dnbD6K/node_modules/@thecodingmachine/rnb-toolbox/dist/index.js:48:56) at async applyPlugin (/private/var/folders/5t/pyldrlys2bx3gltdbnh042v80000gn/T/rncli-init-template-dnbD6K/node_modules/@thecodingmachine/react-native-boilerplate/template/plugins/index.js:22:3) { status: 1, signal: null, output: [ null, <Buffer 79 61 72 6e 20 72 65 6d 6f 76 65 20 76 31 2e 32 32 2e 31 39 0a 5b 31 2f 32 5d 20 52 65 6d 6f 76 69 6e 67 20 6d 6f 64 75 6c 65 20 40 74 68 65 63 6f 64 ... 124 more bytes>, <Buffer 65 72 72 6f 72 20 54 68 69 73 20 6d 6f 64 75 6c 65 20 69 73 6e 27 74 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 61 20 70 61 63 6b 61 67 65 2e 6a 73 6f ... 8 more bytes> ], pid: 9430, stdout: <Buffer 79 61 72 6e 20 72 65 6d 6f 76 65 20 76 31 2e 32 32 2e 31 39 0a 5b 31 2f 32 5d 20 52 65 6d 6f 76 69 6e 67 20 6d 6f 64 75 6c 65 20 40 74 68 65 63 6f 64 ... 124 more bytes>, stderr: <Buffer 65 72 72 6f 72 20 54 68 69 73 20 6d 6f 64 75 6c 65 20 69 73 6e 27 74 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 61 20 70 61 63 6b 61 67 65 2e 6a 73 6f ... 8 more bytes> } TheCodingMachine React-Native Boilerplate initialized with success ! 🚀 .-` `:: `///////////// `/shhhy+- ://. /sy/ /ss/ :NMN: `sssssyhhhyhhy:` `yMMMMNNMMMd. osss: `hMMMh- .-` `+ss: +MMm/. :MMM+----. `mMMm+:-`.oo/` osssyo` `dMMMMh- ohhh- `oyy+- sMMd/. :MMM+` oMMN/- osssyhs`.mMMMMMh- -hds` .syy+- `hMMh:` :MMM+` hMMd: oss-ohhhMMMhdMMh- `. +NNm/. .dMMy:` :MMM+` oMMN/ oss-`shdMMd:dMMh- :-` sMMd/. -NMMo- :MMM+` `mMMm/` `/+:. oss- `sdMd:.hMMh- hMys- `hMMh:` -hdy-` :MMM+` `yMMMMdssss+ oss. `oh/- hMMh- -hyo: dMMs:` -ss+` .oys:` .+yhyo/- -::` `` -syo- ..` +mo- `// `` ``` `` `. - 📚 If you need to read more about this boilerplate : https://thecodingmachine.github.io/react-native-boilerplate/ - 🤕 If you have some troubles : https://github.com/thecodingmachine/react-native-boilerplate/issues - ⭐ If you love this boilerplate, give us a star, you will be a ray of sunshine in our lives :) https://github.com/thecodingmachine/react-native-boilerplate ✖ Installing CocoaPods dependencies (this may take a few minutes) ✖ Installing CocoaPods dependencies (this may take a few minutes) error Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template. Please try again manually: "cd ./ZetaChatApp/ios && pod install". CocoaPods documentation: https://cocoapods.org/
Hi @jeremyspritelyco, for the Error: Command failed: yarn remove @thecodingmachine/rnb-plugin-typescript
I know about it and I am working on it. Btw, it's not a blocking error, it is at the end of the typescript plugin so the react-native-cli script resume when my script fail.
The cocoaPods dependencies error is located in the react native cli not in the boilerplate. Like it's said you need to run it locally with pod install
.
@JeremyDolle any updates?
Can you try it again ? It should be fixed. Feel free to reopen if it's still fail
Hi, I have similar problems related to the post-init.script.js file. Please see below for cli output:
`✔ Downloading template ✔ Copying template ✔ Processing template ℹ Executing post init script ✔ 📘 Using typescript ? … no
📦 Loading the build tool... 🧱 Building the javascript source... node:internal/errors:865 const err = new Error(message); ^
Error: Command failed: npx tsc --jsx react-native --module ESNext -t esnext --outDir js --noEmit false at checkExecSyncError (node:child_process:885:11) at execSync (node:child_process:957:15) at /private/var/folders/vq/7vg_9zrd2hj46q206r54__vh0000gn/T/rncli-init-template-CfZIhn/node_modules/@thecodingmachine/react-native-boilerplate/template/plugins/compile-js/plugin.js:13:15 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { status: 2, signal: null, output: [ null, Buffer(181) [Uint8Array] [ 101, 114, 114, 111, 114, 32, 84, 83, 50, 54, 56, 56, 58, 32, 67, 97, 110, 110, 111, 116, 32, 102, 105, 110, 100, 32, 116, 121, 112, 101, 32, 100, 101, 102, 105, 110, 105, 116, 105, 111, 110, 32, 102, 105, 108, 101, 32, 102, 111, 114, 32, 39, 114, 101, 97, 99, 116, 45, 110, 97, 116, 105, 118, 101, 39, 46, 10, 32, 32, 84, 104, 101, 32, 102, 105, 108, 101, 32, 105, 115, 32, 105, 110, 32, 116, 104, 101, 32, 112, 114, 111, 103, 114, 97, 109, 32, 98, 101, 99, 97, ... 81 more items ], Buffer(0) [Uint8Array] [] ], pid: 2641, stdout: Buffer(181) [Uint8Array] [ 101, 114, 114, 111, 114, 32, 84, 83, 50, 54, 56, 56, 58, 32, 67, 97, 110, 110, 111, 116, 32, 102, 105, 110, 100, 32, 116, 121, 112, 101, 32, 100, 101, 102, 105, 110, 105, 116, 105, 111, 110, 32, 102, 105, 108, 101, 32, 102, 111, 114, 32, 39, 114, 101, 97, 99, 116, 45, 110, 97, 116, 105, 118, 101, 39, 46, 10, 32, 32, 84, 104, 101, 32, 102, 105, 108, 101, 32, 105, 115, 32, 105, 110, 32, 116, 104, 101, 32, 112, 114, 111, 103, 114, 97, 109, 32, 98, 101, 99, 97, ... 81 more items ], stderr: Buffer(0) [Uint8Array] [] }
Node.js v20.4.0 ✖ Processing template error Command failed with exit code 1: /var/folders/vq/7vg_9zrd2hj46q206r54__vh0000gn/T/rncli-init-template-CfZIhn/node_modules/@thecodingmachine/react-native-boilerplate/post-init.script.js. Error: Command failed with exit code 1: /var/folders/vq/7vg_9zrd2hj46q206r54__vh0000gn/T/rncli-init-template-CfZIhn/node_modules/@thecodingmachine/react-native-boilerplate/post-init.script.js at makeError (/Users/agaoglu/.npm/_npx/7930a8670f922cdb/node_modules/execa/lib/error.js:60:11) at handlePromise (/Users/agaoglu/.npm/_npx/7930a8670f922cdb/node_modules/execa/index.js:118:26) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async createFromTemplate (/Users/agaoglu/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/init/init.js:117:7) at async Object.initialize [as func] (/Users/agaoglu/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/init/init.js:184:3) at async Command.handleAction (/Users/agaoglu/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/index.js:109:9) info Run CLI with --verbose flag for more details. `
Hi, I have similar problems related to the post-init.script.js file. Please see below for cli output:
`✔ Downloading template ✔ Copying template ✔ Processing template ℹ Executing post init script ✔ 📘 Using typescript ? … no
📦 Loading the build tool... 🧱 Building the javascript source... node:internal/errors:865 const err = new Error(message); ^
Error: Command failed: npx tsc --jsx react-native --module ESNext -t esnext --outDir js --noEmit false at checkExecSyncError (node:child_process:885:11) at execSync (node:child_process:957:15) at /private/var/folders/vq/7vg_9zrd2hj46q206r54__vh0000gn/T/rncli-init-template-CfZIhn/node_modules/@thecodingmachine/react-native-boilerplate/template/plugins/compile-js/plugin.js:13:15 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { status: 2, signal: null, output: [ null, Buffer(181) [Uint8Array] [ 101, 114, 114, 111, 114, 32, 84, 83, 50, 54, 56, 56, 58, 32, 67, 97, 110, 110, 111, 116, 32, 102, 105, 110, 100, 32, 116, 121, 112, 101, 32, 100, 101, 102, 105, 110, 105, 116, 105, 111, 110, 32, 102, 105, 108, 101, 32, 102, 111, 114, 32, 39, 114, 101, 97, 99, 116, 45, 110, 97, 116, 105, 118, 101, 39, 46, 10, 32, 32, 84, 104, 101, 32, 102, 105, 108, 101, 32, 105, 115, 32, 105, 110, 32, 116, 104, 101, 32, 112, 114, 111, 103, 114, 97, 109, 32, 98, 101, 99, 97, ... 81 more items ], Buffer(0) [Uint8Array] [] ], pid: 2641, stdout: Buffer(181) [Uint8Array] [ 101, 114, 114, 111, 114, 32, 84, 83, 50, 54, 56, 56, 58, 32, 67, 97, 110, 110, 111, 116, 32, 102, 105, 110, 100, 32, 116, 121, 112, 101, 32, 100, 101, 102, 105, 110, 105, 116, 105, 111, 110, 32, 102, 105, 108, 101, 32, 102, 111, 114, 32, 39, 114, 101, 97, 99, 116, 45, 110, 97, 116, 105, 118, 101, 39, 46, 10, 32, 32, 84, 104, 101, 32, 102, 105, 108, 101, 32, 105, 115, 32, 105, 110, 32, 116, 104, 101, 32, 112, 114, 111, 103, 114, 97, 109, 32, 98, 101, 99, 97, ... 81 more items ], stderr: Buffer(0) [Uint8Array] [] }
Node.js v20.4.0 ✖ Processing template error Command failed with exit code 1: /var/folders/vq/7vg_9zrd2hj46q206r54__vh0000gn/T/rncli-init-template-CfZIhn/node_modules/@thecodingmachine/react-native-boilerplate/post-init.script.js. Error: Command failed with exit code 1: /var/folders/vq/7vg_9zrd2hj46q206r54__vh0000gn/T/rncli-init-template-CfZIhn/node_modules/@thecodingmachine/react-native-boilerplate/post-init.script.js at makeError (/Users/agaoglu/.npm/_npx/7930a8670f922cdb/node_modules/execa/lib/error.js:60:11) at handlePromise (/Users/agaoglu/.npm/_npx/7930a8670f922cdb/node_modules/execa/index.js:118:26) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async createFromTemplate (/Users/agaoglu/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/init/init.js:117:7) at async Object.initialize [as func] (/Users/agaoglu/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/init/init.js:184:3) at async Command.handleAction (/Users/agaoglu/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/index.js:109:9) info Run CLI with --verbose flag for more details. `
Yeah i got this also
Install to template with typescript then run the commands by yourself instead of letting it do itself automatically. You can find the CLI commands in this file:
https://github.com/thecodingmachine/react-native-boilerplate/blob/main/template/plugins/compile-js/plugin.js
Thanks! @mtalhagaoglu