$ react-native --version
react-native-cli: 1.0.0
react-native: n/a - not inside a React Native project directory
$ cd /tmp
$ react-native init TestApp
This will walk you through creating a new React Native project in /private/tmp/TestApp
Installing react-native package from npm...
module.js:327
throw err;
^
Error: Cannot find module 'yeoman-environment'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/private/tmp/TestApp/node_modules/react-native/local-cli/generate/generate.js:14:16)
at Module._compile (module.js:409:26)
at loader (/private/tmp/TestApp/node_modules/babel-register/lib/node.js:158:5)
at Object.require.extensions.(anonymous function) [as .js] (/private/tmp/TestApp/node_modules/babel-register/lib/node.js:168:7)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
/tmp/TestApp/package.json
{
"name": "TestApp",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start"
},
"dependencies": {
"react-native": "0.29.0"
}
}
I also got failures when trying to upgrade an existing app, so I figured “lets start with a fresh one and go from there”😉
Its probably upstream? My
yeoman-environment
folder is empty (no lib). Trying an older version.Works for me when adding
"yeoman-environment": "1.6.1"
topackage.json
I created an issue with yeoman-environment, as 1.6.2 tarball has no source files. The best solution would be for them to upload a fixed version