0
votes

Months ago, on my home PC I installed nodejs, react, etc., and got various tutorial sample projects working. Now I’m remoting to my up-to-date Windows 10 work PC to install everything.

I’ve done the setup steps from the Traversy Media React Crash Course tutorial (5 stars), also just now, to double-check, watched the 1-minute video and reviewed the simple instructions at https://www.techomoro.com/how-to-install-and-setup-a-react-app-on-windows-10/ .

So I’ve installed nodejs from https://nodejs.org/en and downloaded react-0.14.3.zip (but there’s not an .msi installer, just a build folder and an examples folder… am I forgetting or missing something?)

Installed create-react-app globally: PS C:\users\molin\dev\myapp> npm install -g create-react-app …which spewed out… C:\Users\molin\AppData\Roaming\npm\create-react-app -> C:\Users\molin\AppData\Roaming\npm\node_modules\create-react-app\index.js [+ sign] [email protected] updated 1 package in 7.639s

When I’m a level above the myapp folder and do either of these: npx create-react-app . npx create-react-app myapp …or if I’m in the myapp folder and do either of these: npx create-react-app myapp npx create-react-app .

… I get the error: Command failed: create-react-app spawn EPERM

Per a suggestion on a board, I ran this and retried, but no joy. npm cache clean --force I even rebooted and tried again.

No events show on the Window Event viewer. Is this a permissions error on my work PC?

Thank you for any advice!

3

3 Answers

0
votes

Reinstall react app globally
npm i -g create-react-app

Recreate your app - create-react-app
(maybe this will help)

0
votes

Got it working, jeez. In case this helps someone...

  • Opened VS Code; Undoubtedly didn't need to do this, but did File >
  • Open the folder myapp (which contained nothing yet)
  • Opened the VS Code terminal, cd .. to go a level up above the myapp folder;
  • npx create-react-app myappNEW , IOW a folder that didn't exist yet.

If I did that last command for "myapp", it gave the spawn error.

I had typed the following, but then tried it and it failed, so this is not the case: Conceivably, when doing this from the powershell, I didn't try npx (rather than npm) with a non-existent folder name.

0
votes

No need for any other package install in your PC or System.

  1. Install node

npm i node

  1. create project

npx create-react-app project_name --template all