You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@dreamchasersuon I was able to replicate the issue
It was happening for me as I had an older version of create-react-app installed globally.
Uninstalling the global package might solve the issue:
npm uninstall -g create-react-app
or rm -rf /usr/local/bin/create-react-app
@dreamchasersuon I was able to replicate the issue
It was happening for me as I had an older version of create-react-app installed globally.
Uninstalling the global package might solve the issue:
npm uninstall -g create-react-app
or rm -rf /usr/local/bin/create-react-app
@dreamchasersuon
This is possibly because you have a global installation of CRA that conflicts with npx.
Try
npm uninstall -g create-react-app
and then do a
npx create-react-app my-app
Also, the yarn error is because package.json is missing the start section in scripts. See below for an example:
"scripts": {
"start": "some command to be run", // you need to add this line
"test": "(eslint lib || true) && jest"
}
I can confirm that uninstalling create-react-app globally fixes this issue with npx. Thank you, guys!
Just wondering why it worked before.
Activity
dreamchasersuon commentedon Mar 12, 2020
BTW: npm -v = 6.13.7
It's work using
yarn create react-app my-app.w3bdesign commentedon Mar 12, 2020
@dreamchasersuon
This is possibly because you have a global installation of CRA that conflicts with npx.
Try
npm uninstall -g create-react-appand then do a
npx create-react-app my-appAlso, the yarn error is because package.json is missing the start section in scripts. See below for an example:
kuccello commentedon Mar 12, 2020
I can confirm that even without any global install of create-react-app the NPX call is failing to create an actual react application
Node 12.6.0
Contents of package.json are
{ "name": "experimental-webclient", "version": "0.1.0", "private": true, "dependencies": { "react": "^16.13.0", "react-dom": "^16.13.0", "react-scripts": "3.4.0" } }w3bdesign commentedon Mar 12, 2020
It is possible that there is an issue with the npm cache.
Try something like
Also check out https://docs.npmjs.com/cli/cache.html to read up on the npm cache commands.
ayushinigam commentedon Mar 13, 2020
@dreamchasersuon I was able to replicate the issue
It was happening for me as I had an older version of create-react-app installed globally.
Uninstalling the global package might solve the issue:
npm uninstall -g create-react-appor
rm -rf /usr/local/bin/create-react-appdreamchasersuon commentedon Mar 13, 2020
I can confirm that uninstalling create-react-app globally fixes this issue with npx. Thank you, guys!
Just wondering why it worked before.