create-react-app not working
See original GitHub issueBlakes-MacBook-Pro:desktop blake$ npx create-react-app my-app
Creating a new React app in /Users/blake/Desktop/my-app.
warning …/…/package.json: No license field Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts with cra-template…
yarn add v1.22.4 warning …/…/package.json: No license field [1/4] 🔍 Resolving packages… [2/4] 🚚 Fetching packages… [3/4] 🔗 Linking dependencies… warning “react-scripts > @typescript-eslint/eslint-plugin > tsutils@3.17.1” has unmet peer dependency “typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta”. [4/4] 🔨 Building fresh packages… [1/4] ⠁ fsevents [-/4] ⠁ waiting… [-/4] ⠁ waiting… warning Error running install script for optional dependency: "/Users/blake/Desktop/my-app/node_modules/fsevents: Command failed. Exit code: 1 Command: node-gyp rebuild Arguments: Directory: /Users/blake/Desktop/my-app/node_modules/fsevents Output: gyp info it worked if it ends with ok gyp info using node-gyp@5.0.3 gyp info using node@12.9.0 | darwin | x64 gyp info find Python using Python version 2.7.16 found at "/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python" gyp info spawn /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python gyp info spawn args [ gyp info spawn args ‘/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py’, gyp info spawn args ‘binding.gyp’, gyp info spawn args ‘-f’, gyp info spawn args ‘make’, gyp info spawn args ‘-I’, gyp info spawn args ‘/Users/blake/Desktop/my-app/node_modules/fsevents/build/config.gypi’, gyp info spawn args ‘-I’, gyp info spawn args ‘/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi’, gyp info spawn args ‘-I’, gyp info spawn args ‘/Users/blake/Library/Caches/node-gyp/12.9.0/include/node/common.gypi’, gyp info spawn args ‘-Dlibrary=shared_library’, gyp info spawn args ‘-Dvisibility=default’, gyp info spawn args ‘-Dnode_root_dir=/Users/blake/Library/Caches/node-gyp/12.9.0’, gyp info spawn args ‘-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp’, gyp info spawn args ‘-Dnode_lib_file=/Users/blake/Library/Caches/node-gyp/12.9.0/<(target_arch)/node.lib’, gyp info spawn args ‘-Dmodule_root_dir=/Users/blake/Desktop/my-app/node_modules/fsevents’, gyp info spawn args ‘-Dnode_engine=v8’, gyp info spawn args ‘–depth=.’, gyp info spawn args ‘–no-parallel’, gyp info spawn args ‘–generator-output’, gyp info spawn args ‘build’, gyp info spawn args ‘-Goutput_dir=.’ gyp info spawn args ] No receipt for ‘com.apple.pkg.CLTools_Executables’ found at ‘/’.
No receipt for ‘com.apple.pkg.DeveloperToolsCLILeo’ found at ‘/’.
No receipt for ‘com.apple.pkg.DeveloperToolsCLI’ found at ‘/’.
gyp: No Xcode or CLT version detected!
gyp ERR! configure error
gyp ERR! stack Error: gyp
failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:344:16)
gyp ERR! stack at ChildProcess.emit (events.js:209:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 19.3.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/blake/Desktop/my-app/node_modules/fsevents
gyp ERR! node -v v12.9.0
success Saved lockfile.
success Saved 13 new dependencies.
info Direct dependencies
├─ cra-template@1.0.3
├─ react-dom@16.13.1
├─ react-scripts@3.4.1
└─ react@16.13.1
info All dependencies
├─ @babel/plugin-transform-flow-strip-types@7.9.0
├─ @babel/plugin-transform-runtime@7.9.0
├─ @babel/plugin-transform-typescript@7.9.0
├─ @babel/preset-typescript@7.9.0
├─ babel-preset-react-app@9.1.2
├─ cra-template@1.0.3
├─ eslint-config-react-app@5.2.1
├─ react-dev-utils@10.2.1
├─ react-dom@16.13.1
├─ react-error-overlay@6.0.7
├─ react-scripts@3.4.1
├─ react@16.13.1
└─ scheduler@0.19.1
✨ Done in 9.25s.
internal/modules/cjs/loader.js:775
throw err;
^
Error: Cannot find module ‘./gitignore’ Require stack:
- /Users/blake/Desktop/my-app/node_modules/globby/index.js
- /Users/blake/Desktop/my-app/node_modules/react-dev-utils/globby.js
- /Users/blake/Desktop/my-app/node_modules/react-scripts/scripts/utils/verifyTypeScriptSetup.js
- /Users/blake/Desktop/my-app/node_modules/react-scripts/scripts/init.js
- /Users/blake/Desktop/my-app/[eval] at Function.Module._resolveFilename (internal/modules/cjs/loader.js:772:15) at Function.Module._load (internal/modules/cjs/loader.js:677:27) at Module.require (internal/modules/cjs/loader.js:830:19) at require (internal/modules/cjs/helpers.js:68:18) at Object.<anonymous> (/Users/blake/Desktop/my-app/node_modules/globby/index.js:6:19) at Module._compile (internal/modules/cjs/loader.js:936:30) at Object.Module._extensions…js (internal/modules/cjs/loader.js:947:10) at Module.load (internal/modules/cjs/loader.js:790:32) at Function.Module._load (internal/modules/cjs/loader.js:703:12) at Module.require (internal/modules/cjs/loader.js:830:19) { code: ‘MODULE_NOT_FOUND’, requireStack: [ ‘/Users/blake/Desktop/my-app/node_modules/globby/index.js’, ‘/Users/blake/Desktop/my-app/node_modules/react-dev-utils/globby.js’, ‘/Users/blake/Desktop/my-app/node_modules/react-scripts/scripts/utils/verifyTypeScriptSetup.js’, ‘/Users/blake/Desktop/my-app/node_modules/react-scripts/scripts/init.js’, ‘/Users/blake/Desktop/my-app/[eval]’ ] }
Aborting installation. node has failed.
Deleting generated file… node_modules Deleting generated file… package.json Deleting generated file… yarn.lock Deleting my-app/ from /Users/blake/Desktop Done. ``
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top GitHub Comments
I’m sorry to say that I couldn’t reproduce the issue either.
Here are a few things that have worked for me in the past:
Upgrade Node.
Depending on your setup, the below commands may or may not require
sudo
. The following worked for me.Re-install Yarn Package Manager:
Install the Xcode toolkit.
Reset the Xcode toolkit.
Reinstall Xcode from Apple’s Website.
–robv8r
This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue.