0

I created a react app with npx create-react-app myburger and then entered the project through cd myburger. After that when I run the command npm start, the following error shows:

$ npm start

> myburger@0.1.0 start E:\front-end projects\burger\myburger
> react-scripts start

Starting the development server...

events.js:287
      throw er; // Unhandled 'error' event
      ^

Error: spawn powershell ENOENT
←[90m    at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)←[39m
←[90m    at onErrorNT (internal/child_process.js:469:16)←[39m
←[90m    at processTicksAndRejections (internal/process/task_queues.js:84:21)←[39m
Emitted 'error' event on ChildProcess instance at:
←[90m    at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)←[39m
←[90m    at onErrorNT (internal/child_process.js:469:16)←[39m
←[90m    at processTicksAndRejections (internal/process/task_queues.js:84:21)←[39m {
  errno: ←[32m'ENOENT'←[39m,
  code: ←[32m'ENOENT'←[39m,
  syscall: ←[32m'spawn powershell'←[39m,
  path: ←[32m'powershell'←[39m,
  spawnargs: [
    ←[32m'-NoProfile'←[39m,
    ←[32m'-NonInteractive'←[39m,
    ←[32m'–ExecutionPolicy'←[39m,
    ←[32m'Bypass'←[39m,
    ←[32m'-EncodedCommand'←[39m,
    ←[32m'UwB0AGEAcgB0ACAAIgBgACIAaAB0AHQAcAA6AC8ALwBsAG8AYwBhAGwAaABvAHMAdAA6ADMAMAAwADAAYAAiACIA'←[39m
  ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! myburger@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the myburger@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\User\AppData\Roaming\npm-cache\_logs\2020-09-08T15_41_32_469Z-debug.log

All the previous projects that I have runs fine. Only the new ones that I am creating now are facing this problem. I am on 32 bit windows 7, using vscode and bash. Can anyone provide a solution?

iscream
  • 680
  • 2
  • 8
  • 20

2 Answers2

1

Have you install all npm modules by npm install. Please check in your folders.

Jayant
  • 280
  • 2
  • 6
  • I just tried running `npm install` again. It seems like it skipped the 'optional' files. However, I still get the same error – iscream Sep 08 '20 at 16:14
  • what is your node version? Is node installed with globally in you system. May this link will help you.https://reactjs.org/docs/create-a-new-react-app.html – Jayant Sep 08 '20 at 16:17
  • I am using node 12.16.3. I'm not sure if its installed globally or not. I suppose it is, since I installed it with the regular windows installer – iscream Sep 08 '20 at 16:28
0

I tried many things and the only one that worked for me was to downgrade: npm install react-scripts@2.1.8 Tbh I don't know why it worked