Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !1902

Added a name and version to package.json so it will get further in the install process on windows.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/ryanhugh/master into master 8 years ago
  • Overview 5
  • Commits 2
  • Pipelines 0
  • Changes 1

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$
Loading
Loading

Activity


  • Administrator
    Administrator @root · 8 years ago
    Author Contributor

    Created by: facebook-github-bot

    Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

    If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact cla@fb.com if you have any questions.

  • Administrator
    Administrator @root · 8 years ago
    Author Contributor

    Created by: Timer

    Hi! Thanks for the PR, but the root package.json purposely does not have a name (nor version) field as this is a independently versioned monorepo.

    npm install -g create-react-app works fine for me, are you using a npm mirror or something?

    You can try running npm cache clean followed by the global install once more.

    Please open an issue to further diagnose this problem.

  • Administrator
    Administrator @root · 8 years ago
    Author Contributor

    Created by: ryanhugh

    I think this was a bug specific to Git Bash on Windows. I tried it on a Mac earlier today and it worked perfectly. Just installed it with CMD on Windows and it also worked. If anyone else is having problems try installing with CMD instead of Git Bash and/or renaming ~/appdata/roaming/npm to something else temporarily. Windows... :/

  • Administrator
    Administrator @root · 8 years ago
    Author Contributor

    Created by: Timer

    I use this on Git Bash on Windows (at work) and it works. npm cache clean should work better than ~/appdata/roaming/npm.

    As for seeking a resolution, I don't think this is a bug on our end. The root package.json isn't present in any of our published packages. :sweat_smile: Probably just a botched NPM fetch (use Yarn!).

  • Administrator
    Administrator @root · 8 years ago
    Author Contributor

    Created by: ryanhugh

    lol!

    Thanks for the help!

Please register or sign in to reply
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
2
CLA Signed tag: documentation
2
CLA Signed tag: documentation
    Assign labels
  • Manage project labels

Milestone
2.1.6
2.1.6
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 participants
Reference: facebook/create-react-app!6481
Source branch: github/fork/ryanhugh/master

Menu

Explore Projects Groups Snippets