question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

create-react-app not working

See original GitHub issue

Blakes-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:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
robv8rcommented, Mar 25, 2020

I’m sorry to say that I couldn’t reproduce the issue either.

my-app % node --version
v12.16.1
my-app % yarn --version
1.22.4

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.

sudo npm install -g n
npm cache clean -f
sudo n stable
sudo npm update -g
node -v
npm -v

Re-install Yarn Package Manager:

brew reinstall yarn

Install the Xcode toolkit.

xcode-select --install

Reset the Xcode toolkit.

sudo xcode-select --reset

Reinstall Xcode from Apple’s Website.

–robv8r

0reactions
stale[bot]commented, May 15, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create React App not working - Stack Overflow
1. update the npm version (npm install npm@latest -g) · 2. clear the cache (npm cache clean --force) · 3. create the react...
Read more >
What To Do if create-react-app Doesn't Work
1. npm uninstall -g create-react-app. This is the npm command to uninstall your global installation of create-react-app .
Read more >
npx create-react-app not working? Here's the solution.
The current solution is simple — run create-react-app and target the latest version. Run creact-react-app using the latest version. npx create- ...
Read more >
npx create-react-app is not working · Issue #10132 - GitHub
First, you'll need to uninstall "create-react-app" using the "npm uninstall -g create-react-app" command. Run "npx create-react-app my-app" each ...
Read more >
create-react-app: command not found (React) error [Solved]
Use `npx` to solve the error create-react-app: command not found, e.g. `npx create-react-app my-app` or install the package globally by running `npm install ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found