Created by: ryanhugh
Yo!
create-react-app is an awesome tool, thanks for making it!
I tried to install it on Windows in Git Shell with the command npm -g i create-react-app
, but ran into the following error:
~/Desktop/code$ npm install -g create-react-app
npm ERR! addLocal Could not install C:\users\ryan\Desktop\code\create-react-app
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "create-react-app"
npm ERR! node v6.10.1
npm ERR! npm v3.10.10
npm ERR! No name provided in package.json
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! C:\users\ryan\Desktop\code\npm-debug.log
~/Desktop/code$ which npm
/c/Program Files/nodejs/npm
I forked the repo and added a name field in the create-react-app package.json
~/Desktop/code/create-react-app-fjdlkasjfls$ npm install -g git+ssh://git@github.com:ryanhugh/create-react-app.git
npm ERR! addLocal Could not install C:\Users\Ryan\AppData\Local\Temp\npm-11812-31970819\git-cache-df4a41b4\4ac9e27b0fed5d716289fe935337006c79d4ba62
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "git+ssh://git@github.com:ryanhugh/create-react-app.git"
npm ERR! node v6.10.1
npm ERR! npm v3.10.10
npm ERR! No version provided in package.json
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! C:\users\ryan\Desktop\code\create-react-app-fjdlkasjfls\npm-debug.log
~/Desktop/code/create-react-app-fjdlkasjfls$
Fixed that error by adding a version field to the package.json. Looks like name and version should be present in a package.json (link 1, link 2)
After those changes then got this error.
~/appdata/roaming/npm$ npm install -g git+ssh://git@github.com:ryanhugh/create-react-app.git
> create-react-app@0.9.5 postinstall C:\Users\Ryan\AppData\Roaming\npm\node_modules\create-react-app
> lerna bootstrap
fatal: Not a git repository (or any of the parent directories): .git
Initializing Git repository.
Lerna v2.0.0-beta.38
Independent Versioning Mode
Bootstrapping 5 packages
Preinstalling packages
Installing external dependencies
NpmUtilities.installInDir ("C:\\Users\\Ryan\\AppData\\Roaming\\npm\\node_modules\\create-react-app\\packages\\babel-preset-reac...)
Command exited with status 1: npm install
Errored while running BootstrapCommand.execute
Command exited with status 1: npm install
Waiting for 3 child processes to exit. CTRL-C to exit immediately.
NpmUtilities.installInDir ("C:\\Users\\Ryan\\AppData\\Roaming\\npm\\node_modules\\create-react-app\\packages\\create-react-app"...)
Command exited with status 1: npm install
NpmUtilities.installInDir ("C:\\Users\\Ryan\\AppData\\Roaming\\npm\\node_modules\\create-react-app\\packages\\react-dev-utils",...)
Command exited with status 1: npm install
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "git+ssh://git@github.com:ryanhugh/create-react-app.git"
npm ERR! node v6.10.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! create-react-app@0.9.5 postinstall: `lerna bootstrap`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the create-react-app@0.9.5 postinstall script 'lerna bootstrap'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the create-react-app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! lerna bootstrap
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs create-react-app
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls create-react-app
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\users\ryan\appdata\roaming\npm\npm-debug.log
Unsure what the best way to solve that is, but I bypassed that error by cd'ing to the directory where npm installs packages globally and running npm install without the global flag.
cd ~/appdata/roaming/npm
npm install create-react-app # Note: no --global
Output:
~/appdata/roaming/npm$ npm install git+ssh://git@github.com:ryanhugh/create-react-app.git
> create-react-app@0.9.5 postinstall C:\users\ryan\appdata\roaming\npm\node_modules\create-react-app
> lerna bootstrap
fatal: Not a git repository (or any of the parent directories): .git
Initializing Git repository.
Lerna v2.0.0-beta.38
Independent Versioning Mode
Bootstrapping 5 packages
Preinstalling packages
Installing external dependencies
Symlinking packages and binaries
Postinstalling packages
Prepublishing packages
Successfully bootstrapped 5 packages.
C:\users\ryan\appdata\roaming\npm
`-- create-react-app@0.9.5 (git+ssh://git@github.com/ryanhugh/create-react-app.git#82a629f5205b4c111d30bac69d631a4c75e8c35c)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\babel-cli\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\forever\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\karma\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN enoent ENOENT: no such file or directory, open 'C:\users\ryan\appdata\roaming\npm\package.json'
npm WARN npm No description
npm WARN npm No repository field.
npm WARN npm No README data
npm WARN npm No license field.
~/appdata/roaming/npm$