Skip to content

Cannot find module 'rncli-init-template-FBKsnC/node_modules/typescript/template.config' #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
martin-braun opened this issue Jul 19, 2019 · 2 comments

Comments

@martin-braun
Copy link

Bug

I did

npm init
npm i react-native react-native-template-typescript -D
npx react-native init app --template typescript

but the output is:

✔ Downloading template
✖ Copying template
error Error: Cannot find module '/var/folders/xj/t4w3l34124g6bxv455kt25ph0000gn/T/rncli-init-template-FBKsnC/node_modules/typescript/template.config'
Require stack:
- ./node_modules/react-native/node_modules/@react-native-community/cli/build/commands/init/template.js
- ./node_modules/react-native/node_modules/@react-native-community/cli/build/commands/init/init.js
- ./node_modules/react-native/node_modules/@react-native-community/cli/build/commands/init/index.js
- ./node_modules/react-native/node_modules/@react-native-community/cli/build/commands/index.js
- ./node_modules/react-native/node_modules/@react-native-community/cli/build/cliEntry.js
- ./node_modules/react-native/node_modules/@react-native-community/cli/build/index.js
- . /node_modules/react-native/cli.js

Environment info

React native info output:

$ npx react-native info
info Fetching system and libraries information...
System:
    OS: macOS 10.14.5
    CPU: (8) x64 Intel(R) Core(TM) i7-4750HQ CPU @ 2.00GHz
    Memory: 353.47 MB / 8.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 12.6.0 - /usr/local/bin/node
    npm: 6.9.0 - /usr/local/bin/npm
  SDKs:
    iOS SDK:
      Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
    Android SDK:
      API Levels: 19, 22, 23, 24, 25, 26, 28
      Build Tools: 25.0.2, 26.0.2, 27.0.3, 28.0.0, 28.0.3
      System Images: android-28 | Google Play Intel x86 Atom
      Android NDK: 17.2.4988734
  IDEs:
    Android Studio: 3.3 AI-182.5107.16.33.5314842
    Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
  npmPackages:
    react-native: ^0.60.4 => 0.60.4

react-native 0.60.4
react-native-typescript-template 5.2.0

Steps To Reproduce

Please see the Bug section above. Template / generator packages are installed locally and executed with npx.

What I expected to happen: The project creation succeed.

@martin-braun
Copy link
Author

Found the fix in #38

@whizosk
Copy link

whizosk commented Jan 2, 2020

I had same problems and I solved with uninstalling node.js and installing again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants