Couldn't find the template.config.js file inside "typescript" template
likern opened this issue · 5 comments
Expected results
Failed to create project from template
What did you expect to happen?
Succussful RN project with TypeScript creation
Observed results
Logs
[packages]$ npx react-native init FeeveApp --template typescript
Need to install the following packages:
react-native
Ok to proceed? (y) y
warn Package @react-native-community/eslint-config has been ignored because it contains invalid configuration. Reason: Cannot find module '@react-native-community/eslint-config/package.json'
Require stack:
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/tools/config/resolveNodeModuleDir.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/tools/releaseChecker/index.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/start/runServer.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/start/start.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/index.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/index.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/bin.js
warn Package eslint has been ignored because it contains invalid configuration. Reason: Cannot find module 'eslint/package.json'
Require stack:
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/tools/config/resolveNodeModuleDir.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/tools/releaseChecker/index.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/start/runServer.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/start/start.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/index.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/index.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/bin.js
warn Package eslint-plugin-prettier has been ignored because it contains invalid configuration. Reason: Cannot find module 'eslint-plugin-prettier/package.json'
Require stack:
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/tools/config/resolveNodeModuleDir.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/tools/releaseChecker/index.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/start/runServer.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/start/start.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/index.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/index.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/bin.js
warn Package eslint-plugin-react-hooks has been ignored because it contains invalid configuration. Reason: Cannot find module 'eslint-plugin-react-hooks/package.json'
Require stack:
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/tools/config/resolveNodeModuleDir.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/tools/releaseChecker/index.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/start/runServer.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/start/start.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/index.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/index.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/bin.js
warn Package lerna has been ignored because it contains invalid configuration. Reason: Cannot find module 'lerna/package.json'
Require stack:
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/tools/config/resolveNodeModuleDir.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/tools/releaseChecker/index.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/start/runServer.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/start/start.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/index.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/index.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/bin.js
warn Package typescript has been ignored because it contains invalid configuration. Reason: Cannot find module 'typescript/package.json'
Require stack:
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/tools/config/resolveNodeModuleDir.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/tools/releaseChecker/index.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/start/runServer.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/start/start.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/index.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/index.js
- /home/me/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/bin.js
###### ######
### #### #### ###
## ### ### ##
## #### ##
## #### ##
## ## ## ##
## ### ### ##
## ######################## ##
###### ### ### ######
### ## ## ## ## ###
### ## ### #### ### ## ###
## #### ######## #### ##
## ### ########## ### ##
## #### ######## #### ##
### ## ### #### ### ## ###
### ## ## ## ## ###
###### ### ### ######
## ######################## ##
## ### ### ##
## ## ## ##
## #### ##
## #### ##
## ### ### ##
### #### #### ###
###### ######
Welcome to React Native!
Learn once, write anywhere
✔ Downloading template
✖ Copying template
error Error: Couldn't find the "/tmp/rncli-init-template-5vAI2Q/node_modules/typescript/template.config.js file inside "typescript" template. Please make sure the template is valid. Read more: https://github.com/react-native-community/cli/blob/master/docs/init.md#creating-custom-templateSteps to reproduce
- Call
npx react-native init FeeveApp --template typescriptinside monorepo setup inpackages/folder - See failure
Doesn't relate to monorepo thing, it just doesn't work at all.
I suggest it's react-native cli bug, but not sure.
typescript is not the correct template name.
Please use the correct template: npx react-native init MyApp --template react-native-template-typescript
@emin93 I used command from official documentation
npx react-native init AwesomeTSProject --template react-native-template-typescript and it fails the same way.
It is some problem with newer yarn versions.
if I use yarn "berry" version yarn set version berry I get this error.
When I return to "normal" yarn yarn set version classic it works ok.
seems to be a yarn thing indeed. I've added the --npm flag on the command and the generation worked

