cli: Fails: react-native init helloworld --version 0.59.10

Environment

> react-native --version
react-native-cli: 2.0.1
react-native: n/a - not inside a React Native project directory

Description

react-native init helloworld --version 0.59.10

fails with:

...
├─ y18n@3.2.1
└─ yargs-parser@7.0.0
Done in 7.36s.
internal/modules/cjs/loader.js:583
    throw err;
    ^

Error: Cannot find module '../../tools/PackageManager'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/home/titan/shared/tera/cloud9/tmp/tar/helloworld/node_modules/@react-native-community/cli/build/commands/install/install.js:10:46)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)

full log: https://gist.github.com/mindlapse/625ceece338c17954e32d96497290672

Reproducible Demo

react-native init helloworld --version 0.59.10

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 5
  • Comments: 18 (5 by maintainers)

Commits related to this issue

Most upvoted comments

Fixed in 1.11.2. Please update the @react-native-community/cli to the latest version.

same error delete node_modules and package-lock.json then update package.json “dependencies”: { “react”:"16.0.3 to “react”: “16.8.6”,} and in scritps { “test”:“jest” } => npm install --save , expo start it’s working in my code

thanks it worked now

Issue appears on multiple npm versions, including npm@next and npm@5.10.0, and with node 10.16.0 (LTS)