microsoft / TypeScript-React-Starter

A starter template for TypeScript and React with a detailed README describing how to use the two together.
MIT License
11.09k stars 1.21k forks source link

windows typescript-react-starter got issue #51

Open kotapatikk opened 7 years ago

kotapatikk commented 7 years ago

Hi Team,

Trying to install npm react-scripts-ts not working in Windows7 - 64-bit Process.

find my node , npm versions in below for reference.

C:\Users\125\NodeJS\reactjs>npm --version 5.3.0

C:\Users\125\NodeJS\reactjs>node --version v6.11.1

C:\Users\125\NodeJS\reactjs>npm install -g create-react-app C:\Users\125\AppData\Roaming\npm\create-react-app -> C:\Users\125\AppD ata\Roaming\npm\node_modules\create-react-app\index.js

C:\Users\125\NodeJS\reactjs>create-react-app my-app --scripts-version=react -scripts-ts Creating a new React app in C:\Users\125\NodeJS\reactjs\my-app.

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

npm ERR! path C:\Users\125\NodeJS\reactjs\my-app\node_modules\fsevents\node _modules\tar-pack\node_modules npm ERR! code EPERM npm ERR! errno -4048 npm ERR! syscall scandir npm ERR! Error: EPERM: operation not permitted, scandir 'C:\Users\125\NodeJ S\reactjs\my-app\node_modules\fsevents\node_modules\tar-pack\node_modules' npm ERR! at Error (native) npm ERR! { Error: EPERM: operation not permitted, scandir 'C:\Users\125\No deJS\reactjs\my-app\node_modules\fsevents\node_modules\tar-pack\node_modules' npm ERR! at Error (native) npm ERR! stack: 'Error: EPERM: operation not permitted, scandir \'C:\Users\5 0030059\NodeJS\reactjs\my-app\node_modules\fsevents\node_modules\tar-pack \node_modules\'\n at Error (native)', npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'scandir', npm ERR! path: 'C:\Users\125\NodeJS\reactjs\my-app\node_modules\fs events\node_modules\tar-pack\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\125\AppData\Roaming\npm-cache_logs\2017-07-27T1356 32_175Z-debug.log

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

Deleting generated file... node_modules Deleting generated file... package.json Deleting my-app / from C:\Users\125\NodeJS\reactjs Done.

C:\Users\125\NodeJS\reactjs>

bonebizz21 commented 7 years ago

Thanks. This would be helpfu6

tcatche commented 7 years ago

I also had this problem, and solved it with doing this :

  1. Stop other node works.
  2. Run npm cache clean.
  3. Retry install.
schaveyt commented 6 years ago

Hmm. I tried the npm cache clean and nada. It appears this is a registered issue with npm5 on this topic.

I had the following installed:

Apply their recommended workaround of rolling back npm to v5.0.3 seems to work for me.

> npm cache clear --force
> npm install -g npm@5.0.3
> create-react-app my-app --scripts-version=react-scripts-ts