facebook / create-react-app

Set up a modern web app by running one command.
https://create-react-app.dev
MIT License
102.8k stars 26.88k forks source link

Aborting installation. npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed. #9475

Closed MShahzad-pk closed 4 years ago

MShahzad-pk commented 4 years ago

$ npx create-react-app expense-tracker

Creating a new React app in /home/abisim32/learning/Bootcamps/expense-tracker.

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 '....2.1","ejs":"0.4.2","'

npm ERR! A complete log of this run can be found in: npm ERR! /home/abisim32/.npm/_logs/2020-08-12T17_19_26_381Z-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 Deleting expense-tracker/ from /home/abisim32/learning/Bootcamps Done.

$ npm -v 6.14.4 $ create-react-app --version 3.4.1

OS Ubuntu 20.04 LTS

MShahzad-pk commented 4 years ago

i have tried fol command

$ npm config list ; cli configs metrics-registry = "https://registry.npmjs.org/" scope = "" user-agent = "npm/6.14.4 node/v10.19.0 linux x64"

; builtin config undefined globalconfig = "/etc/npmrc" globalignorefile = "/etc/npmignore" prefix = "/usr/local"

; node bin location = /usr/bin/node ; cwd = /home/abisim32/learning/Bootcamps ; HOME = /home/abisim32 ; "npm config ls -l" to show all defaults.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

stale[bot] commented 4 years ago

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.

Swadhen commented 4 years ago

Can not create a new react app. Having this problem.

npx create-react-app nasa-apod

Creating a new React app in E:\nasa-apod\nasa-apod.

Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts with cra-template...

npm ERR! code EPERM npm ERR! syscall mkdir npm ERR! path C:\Users\Syed-Swadhen npm ERR! errno -4048 npm ERR! Error: EPERM: operation not permitted, mkdir 'C:\Users\Syed-Swadhen'
npm ERR! [OperationalError: EPERM: operation not permitted, mkdir 'C:\Users\Syed-Swadhen'] { npm ERR! cause: [Error: EPERM: operation not permitted, mkdir 'C:\Users\Syed-Swadhen'] { npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'mkdir', npm ERR! path: 'C:\Users\Syed-Swadhen' npm ERR! }, npm ERR! isOperational: true, npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'mkdir', npm ERR! path: 'C:\Users\Syed-Swadhen' npm ERR! } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It's possible that the file was already in use (by a text editor or antivirus), npm ERR! or that you lack permissions to access it. npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check thenpm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator. npm ERR! code EPERM npm ERR! syscall mkdir npm ERR! path C:\Users\Syed-Swadhen npm ERR! errno -4048 npm ERR! Error: EPERM: operation not permitted, mkdir 'C:\Users\Syed-Swadhen'
npm ERR! [OperationalError: EPERM: operation not permitted, mkdir 'C:\Users\Syed-Swadhen'] { npm ERR! cause: [Error: EPERM: operation not permitted, mkdir 'C:\Users\Syed-Swadhen'] { npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'mkdir', npm ERR! path: 'C:\Users\Syed-Swadhen' npm ERR! }, npm ERR! isOperational: true, npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'mkdir', npm ERR! path: 'C:\Users\Syed-Swadhen' npm ERR! } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It's possible that the file was already in use (by a text editor or antivirus), npm ERR! or that you lack permissions to access it. npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check thenpm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator. npm ERR! code EPERM npm ERR! syscall mkdir npm ERR! path C:\Users\Syed-Swadhen npm ERR! errno -4048 npm ERR! Error: EPERM: operation not permitted, mkdir 'C:\Users\Syed-Swadhen' npm ERR! [OperationalError: EPERM: operation not permitted, mkdir 'C:\Users\Syed-Swadhen'] { npm ERR! cause: [Error: EPERM: operation not permitted, mkdir 'C:\Users\Syed-Swadhen'] { npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'mkdir', npm ERR! path: 'C:\Users\Syed-Swadhen' npm ERR! }, npm ERR! isOperational: true, npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'mkdir', npm ERR! path: 'C:\Users\Syed-Swadhen' npm ERR! } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It's possible that the file was already in use (by a text editor or antivirus), npm ERR! or that you lack permissions to access it. npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check thenpm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator. npm ERR! code EPERM npm ERR! syscall mkdir npm ERR! path C:\Users\Syed-Swadhen npm ERR! errno -4048 npm ERR! Error: EPERM: operation not permitted, mkdir 'C:\Users\Syed-Swadhen'
npm ERR! [OperationalError: EPERM: operation not permitted, mkdir 'C:\Users\Syed-Swadhen'] { npm ERR! cause: [Error: EPERM: operation not permitted, mkdir 'C:\Users\Syed-Swadhen'] { npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'mkdir', npm ERR! path: 'C:\Users\Syed-Swadhen' npm ERR! }, npm ERR! isOperational: true, npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'mkdir', npm ERR! path: 'C:\Users\Syed-Swadhen' npm ERR! } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It's possible that the file was already in use (by a text editor or antivirus), npm ERR! or that you lack permissions to access it. npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check thenpm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

Aborting installation. npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.

Deleting generated file... package.json Deleting nasa-apod/ from E:\nasa-apod Done.

ranafaraznaru commented 3 years ago

did you fix this error ?