Error running the following command: npx create-react-app my-app
See original GitHub issueIssue
I’m running the following command
npx create-react-app my-app
And I’m getting an error. I’ll post the error at the bottom.
I checked the Troubleshooting docs https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#troubleshooting
and Stack Overflow, only solution I tried is running the command:
npm install -g create-react-app
create-react-app my-app
Which gave me another error.
I will admit, I’m not able to decipher the error message.
Feel free to contact me if you need additional information.
Environment
By running: npx create-react-app --info
Environment: OS: macOS High Sierra 10.13.4 Node: 9.5.0 Yarn: Not Found npm: 6.0.0 Watchman: Not Found Xcode: Xcode 9.4 Build version 9F1027a Android Studio: Not Found
Error Message - Terminal Output
frankcarloneiii react $ pwd
/Users/frankcarloneiii/Documents/coding/react
frankcarloneiii react $ npx create-react-app my-app
Creating a new React app in /Users/frankcarloneiii/Documents/coding/react/my-app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
events.js:137░░░░░░⸩ ⠏ extract:js-yaml: sill extract babel-plugin-transform-es2015-literals@6.22.0
throw er; // Unhandled 'error' event
^
Error [ERR_STREAM_WRITE_AFTER_END]: write after end
at writeAfterEnd (_stream_writable.js:237:12)
at PassThrough.Writable.write (_stream_writable.js:287:5)
at PassThrough.Writable.end (_stream_writable.js:573:10)
at ReadEntry.entry.on (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/extract-stream.js:19:41)
at ReadEntry.emit (events.js:165:20)
at ReadEntry.emit (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:296:25)
at ReadEntry.[maybeEmitEnd] (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:249:12)
at ReadEntry.end (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:162:27)
at Unpack.[consumeBody] (/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:210:13)
at Unpack.[consumeChunkSub] (/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:391:40)
at Unpack.[consumeChunk] (/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:362:30)
at Unzip.(anonymous function).on.chunk (/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:291:59)
at Unzip.emit (events.js:160:13)
at Unzip.emit (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:296:25)
at Unzip.write (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:99:17)
at Unzip.write (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minizlib/index.js:284:29)
events.js:137░░░░░░⸩ ⠴ extract:resolve-cwd: sill extract babel-messages@6.23.0
throw er; // Unhandled 'error' event
^
Error [ERR_STREAM_WRITE_AFTER_END]: write after end
at writeAfterEnd (_stream_writable.js:237:12)
at PassThrough.Writable.write (_stream_writable.js:287:5)
at PassThrough.Writable.end (_stream_writable.js:573:10)
at ReadEntry.entry.on (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/extract-stream.js:19:41)
at ReadEntry.emit (events.js:165:20)
at ReadEntry.emit (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:296:25)
at ReadEntry.[maybeEmitEnd] (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:249:12)
at ReadEntry.end (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:162:27)
at Unpack.[consumeBody] (/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:210:13)
at Unpack.[consumeChunkSub] (/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:391:40)
at Unpack.[consumeChunk] (/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:362:30)
at Unzip.(anonymous function).on.chunk (/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:291:59)
at Unzip.emit (events.js:160:13)
at Unzip.emit (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:296:25)
at Unzip.write (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:99:17)
at Unzip.write (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minizlib/index.js:284:29)
npm ERR! cancel after 1 retries!
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/frankcarloneiii/.npm/_logs/2018-06-06T18_07_11_474Z-debug.log
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts has failed.
Deleting generated file... node_modules
Deleting generated file... package.json
Deleting my-app / from /Users/frankcarloneiii/Documents/coding/react
Done.
frankcarloneiii react $ npx create-react-app --info
Environment:
OS: macOS High Sierra 10.13.4
Node: 9.5.0
Yarn: Not Found
npm: 6.0.0
Watchman: Not Found
Xcode: Xcode 9.4 Build version 9F1027a
Android Studio: Not Found
ERROR: package.json not found!
frankcarloneiii react $
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Error when I run npx create-react-app my-app - Stack Overflow
You are running "create-react-app" 4.0.3, which is behind the latest release (5.0.0). We no longer support global installation ...
Read more >NPX Create React APP Not Working - YouTube
To create a new React App, we use npx command with create - react - app and then project name. It should create...
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 >Getting Started - Create React App
If you've previously installed create-react-app globally via npm install -g create-react-app , we recommend you uninstall the package using ...
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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I may have found a solution via
https://github.com/facebook/create-react-app/issues/4478
The following command worked for me:npm create react-app my-app
Thanks @legodude17
Hi @Felix-okeff and @Indira-cit,
Please use one of the following methods to initialise:
Note that you can also pass in
--typescript
to initialise with TypeScript.If the above are not working, please ensure you have the latest versions of
npm
and/oryarn
installed.