Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm ERR code elifecycle, npm ERR errno 1 , When running "npm start" #6950

Closed
LiniEisha opened this issue Apr 29, 2019 · 12 comments
Closed

npm ERR code elifecycle, npm ERR errno 1 , When running "npm start" #6950

LiniEisha opened this issue Apr 29, 2019 · 12 comments
Labels

Comments

@LiniEisha
Copy link

Is this a bug report?

yes

Did you try recovering your dependencies?

C:\Users\Lini Eisha\WebstormProjects\untitled>npm --version
6.9.0

Which terms did you search for in User Guide?

_npm ERR! code ELIFECYCLE
npm ERR! errno 1
_

Environment

**_C:\Users\Lini Eisha\WebstormProjects\untitled>npx create-react-app --info

Environment Info:

System:
OS: Windows 10
CPU: (4) x64 Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
Binaries:
Node: 12.0.0 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Not Found
Internet Explorer: Not Found
npmPackages:
react: ^16.8.6 => 16.8.6
react-dom: ^16.8.6 => 16.8.6
react-scripts: 3.0.0 => 3.0.0
npmGlobalPackages:
create-react-app: Not Found_**

Steps to Reproduce

  1. I used 'create-react-app' command to create an app. The app was created but when i run 'npm start' it gives me the errors -> npm ERR! code ELIFECYCLE
    npm ERR! errno 1

  2. I tried to create apps using command prompt, Webstorm, IntelliJ, Visual Studio Code, Windows PowerShell but I get the same error when I run 'npm start' (in Webstorm I directly choose to create react app option app was built but same error when starting the npm)

  3. I went through many things on the internet and tried to
    reinstall npm and node
    clean the npm cache
    try to upgrade the react version
    upgrade the npm etc. simply i tried everything was there

Expected Behavior

It should start the npm and create a complete react app

Actual Behavior

C:\Users\Lini Eisha\WebstormProjects\untitled>npm start

untitled@0.1.0 start C:\Users\Lini Eisha\WebstormProjects\untitled
react-scripts start
Starting the development server...

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

Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:248:19)
at onErrorNT (internal/child_process.js:431:16)
at processTicksAndRejections (internal/process/task_queues.js:83:17)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
at onErrorNT (internal/child_process.js:431:16)
at processTicksAndRejections (internal/process/task_queues.js:83:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! untitled@0.1.0 start: react-scripts start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the untitled@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\Lini Eisha\AppData\Roaming\npm-cache_logs\2019-04-29T17_36_59_252Z-debug.log

Reproducible Demo

https://github.com/LiniEisha/Application-Framework-Lab-Work/tree/master/untitled

type (in cmd/windows powershell/ intellij/visual studio code)
npx create-react-app
npm start

or in webstorm
create new project --> react app , then type npm start on webstorm terminal

@johnridesabike
Copy link

I've been having the exact same error when running npm start since upgrading to CRA 3.

OS: Windows 10
Node: v10.15.3
NPM: 6.9.0
react: 6.8.6
react-dom: 6.8.6
react-scripts: 3.0.0

I've had no issues when running the same project on my MacOS computer, though.

@ShubhamIngale
Copy link

i'm also having the same error when running npm start .

OS: Windows 8.1
Node: v10.15.3
NPM: 6.9.0

@TheodoraDimitrova
Copy link

i'm having the same problem when running npm start
windows 7
npm 6.2.0
node 12.1.0
"node": "^12.1.0",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-scripts": "3.0.0"

@sahildebug247
Copy link

i'm having the same problem when running npm start
windows 10
npm 6.2.0
node 12.1.0
"react": "^16.8.6",
"react-dom": "^16.8.6"
"react-scripts": "3.0.0"

@TheodoraDimitrova
Copy link

okay, everybody, u have to check path variable,
so u have to add it to the PATH: C:\Windows\System32;
this works for me

@TheodoraDimitrova
Copy link

i'm having the same problem when running npm start
windows 10
npm 6.2.0
node 12.1.0
"react": "^16.8.6",
"react-dom": "^16.8.6"
"react-scripts": "3.0.0"

check my solution

@ShubhamIngale
Copy link

my solution
uninstalled the nodejs LTS version.
install the nodejs current version in c:/windows/system32

and its working again!!

@johnridesabike
Copy link

johnridesabike commented May 2, 2019

Adding C:\Windows\System32 to my path variable seems to have fixed it for me, too!

Some additional background for my particular situation:

I'm running my project off an external drive that that is portable between different PCs. It has Node and VS Code also installed on the drive. In order to run Node scripts, I use a custom PATH string in VS Code's terminal.integrated.env.windows setting.

I don't know if that's a common dev environment, but it usually works pretty well. I haven't had any issues with my Gatsby project on the same drive (which is also React), or with CRA 2, so it looks like this may just be a CRA 3.0 issue?

@NasKhalil
Copy link

i added C:\Windows\System32 to my PATH and it doesn't work :( help plz !!!!!!!!!

@NasKhalil
Copy link

err

@stale
Copy link

stale bot commented Jun 15, 2019

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 stale bot added the stale label Jun 15, 2019
@stale
Copy link

stale bot commented Jun 20, 2019

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.

@stale stale bot closed this as completed Jun 20, 2019
@lock lock bot locked and limited conversation to collaborators Jun 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants