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
can you please explain what exactly is not working in your case??
Even I was facing this issue where only package.json and node_modules was getting created but not the CRA template and that is why I came here to check if anyone else is facing the same.
I tried in windows, ubuntu and WSL ubuntu 18.04 but it was not working anywhere then, I checked my create-react-version by create-react-app --version it was 3.1.0.
then I read this message
A template was not provided. This is likely because you're using an outdated version of create-react-app.
so I upgraded the create-react-app version to 3.3.0 and tried to create the new app and it worked 😃
I think you have not added node's bin path in Environment variable that is why you have to give the whole path to run npm commands, follow this stackoverflow answer to set it.
To answer your actual questions
hit create-react-app --version
to check the version
if it is lower than 3.3.0 then I'll suggest you upgrade create-react-app version by typing following command npm install -g create-react-app it will install the latest version or update the existing to the latest version.
Now to create your react app just type npx create-react-app <name_of_project>
It should spin up a react project template for you
hi @cgibsonmm and @welitonderesende ,
can you post the version of create-react-app package
You can get the version by typing create-react-version --version
You can refer to the previous comment here to update the package if it's already not the latest one. It might just fix your error here as I had the same issue.
I solved my problem already.
I uninstalled node.js then deleted npm and npm cache.
I also went to user/Gustine/appdata and deleted Nodejs and npm modules.
Reinstall Nodejs and initiate react app creation in your editor terminal.
Hope it works for you
On Wed, Jan 22, 2020 at 8:14 AM Austinmac56 ***@***.***> wrote:
I solved my problem already.
I uninstalled node.js then deleted npm and npm cache.
I also went to user/Gustine/appdata and deleted Nodejs and npm modules.
Reinstall Nodejs and initiate react app creation in your editor terminal.
Hope it works for you
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8338?email_source=notifications&email_token=AC5BC6GCBSYDJETDLAH2RQTQ7BBE3A5CNFSM4KITKDZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJTQEBQ#issuecomment-577176070>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC5BC6B2QMTI3AYGH73WD63Q7BBE3ANCNFSM4KITKDZQ>
.
Activity
rohit-ambre commentedon Jan 19, 2020
can you please explain what exactly is not working in your case??
Even I was facing this issue where only package.json and node_modules was getting created but not the CRA template and that is why I came here to check if anyone else is facing the same.
I tried in windows, ubuntu and WSL ubuntu 18.04 but it was not working anywhere then, I checked my create-react-version by
create-react-app --version
it was 3.1.0.then I read this message
so I upgraded the create-react-app version to 3.3.0 and tried to create the new app and it worked 😃
Try upgrading the package and it might work.
Austinmac56 commentedon Jan 19, 2020
How do I check the version and update it on my phpstorm to work fine.
Austinmac56 commentedon Jan 20, 2020
"C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npx-cli.js" create-react-app .
npx: installed 91 in 66.423s
Creating a new React app in C:\Users\Gustine\PhpstormProjects\untitled1.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
npm ERR! Unexpected end of JSON input while parsing near '..."unpackedSize":17505,'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Gustine\AppData\Roaming\npm-cache_logs\2020-01-20T10_54_52_673Z-debug.log
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.
Deleting generated file... package.json
Done.
Done
it can't create package.json file
help me fixit
rohit-ambre commentedon Jan 20, 2020
Hi @Austinmac56
I think you have not added node's bin path in Environment variable that is why you have to give the whole path to run npm commands, follow this stackoverflow answer to set it.
To answer your actual questions
hit
create-react-app --version
to check the version
if it is lower than 3.3.0 then I'll suggest you upgrade create-react-app version by typing following command
npm install -g create-react-app
it will install the latest version or update the existing to the latest version.Now to create your react app just type
npx create-react-app <name_of_project>
It should spin up a react project template for you
itsweliton commentedon Jan 22, 2020
I'm facing the same issue with both ways, npx or create-react-app, it simply does not create the
src/
folder, onlynode_modules/
andpackage.json
Current node version:
v11.15.0
-v10.13.4
also didn't workcgibsonmm commentedon Jan 22, 2020
looks like there may be a problem i just ran npx create-react-app and the same as above my package.json ends up looking like
rohit-ambre commentedon Jan 22, 2020
hi @cgibsonmm and @welitonderesende ,
can you post the version of
create-react-app
packageYou can get the version by typing
create-react-version --version
You can refer to the previous comment here to update the package if it's already not the latest one. It might just fix your error here as I had the same issue.
Austinmac56 commentedon Jan 22, 2020
I solved my problem already.
I uninstalled node.js then deleted npm and npm cache.
I also went to user/Gustine/appdata and deleted Nodejs and npm modules.
Reinstall Nodejs and initiate react app creation in your editor terminal.
Hope it works for you
cgibsonmm commentedon Jan 22, 2020