facebook / create-react-app

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

Unable to create an app using CLI #3193

Closed mokaleem closed 7 years ago

mokaleem commented 7 years ago

Is this a bug report?

I am unable to setup an environment using the CLI command given in the official page. Its been a couple of days I am trying to get it working by Googling and visiting almost all the Stackoverflow and Github links but no help. :(

Environment

  1. node -v: 6.10.2
  2. npm -v: 5.4.2

Then, specify:

  1. Operating system: Windows 10

Steps to Reproduce

  1. create-react-app app-name

Actual Behavior

D:\classes>create-react-app reactify

`Creating a new React app in D:\classes\reactify.

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

uglifyjs-webpack-plugin@0.4.6 postinstall D:\classes\reactify\node_modules\uglifyjs-webpack-plugin node lib/post_install.js

npm ERR! path D:\classes\reactify\node_modules\fsevents\node_modules\getpass\node_modules npm ERR! code EPERM npm ERR! errno -4048 npm ERR! syscall lstat npm ERR! Error: EPERM: operation not permitted, lstat 'D:\classes\reactify\node_modules\fsevents\node_modules\getpass\node_modules' npm ERR! at Error (native) npm ERR! { Error: EPERM: operation not permitted, lstat 'D:\classes\reactify\node_modules\fsevents\node_modules\getpass\node_modules' npm ERR! at Error (native) npm ERR! stack: 'Error: EPERM: operation not permitted, lstat \'D:\classes\reactify\node_modules\fsevents\node_modules\getpass\node_modules\'\n at Error (native)', npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'lstat', npm ERR! path: 'D:\classes\reactify\node_modules\fsevents\node_modules\getpass\node_modules' } npm ERR! npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\kaleem.m\AppData\Roaming\npm-cache_logs\2017-09-26T09_59_24_905Z-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 reactify / from D:\classes Done.

Files Attached

I've attached the log files generated with this.

2017-09-26T09_59_24_905Z-debug.log

Timer commented 7 years ago

Did you try clearing your npm cache? Often these npm bugs can only be fixed by npm, so we cannot help.

My advice to you would be to downgrade to npm@4 if that works for you.

mokaleem commented 7 years ago

Perfect.! Downgrading npm to version 4 solved the issue.. Thanks