Hello, I have been trying to create and work on an app and I have done an npm install -g create-react-app, and then executed create-react-app testName, and it finished successfully. But when I cd in to the project and run npm start or yarn start it fails with the following errors:
I'm having trouble interpreting the error logs, so if anyone has an idea I would appreciate it!
npm start:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 silly lifecycle [email protected]~prestart: no script for prestart, continuing
7 info lifecycle [email protected]~start: [email protected]
8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~start: PATH: C:\Users\bhudi\AppData\Roaming\nvm\v6.11.0\node_modules\npm\bin\node-gyp-bin;C:\repos\test\node_modules\.bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Microsoft MPI\Bin\;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Microsoft Emulator Manager\1.0\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft Team Foundation Server 2013 Power Tools\Best Practices Analyzer\;C:\Program Files (x86)\Microsoft Team Foundation Server 2015 Power Tools\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\TortoiseGit\bin;C:\Go\bin;";.";C:\Program Files\Git\cmd;C:\Program Files (x86)\Yarn\bin;C:\Users\bhudi\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Users\bhudi\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\bhudi\AppData\Local\Yarn\bin;"C:\Users\bhudi\AppData\Local\Programs\Python\Python36-32\;C:\Users\bhudi\AppData\Local\Programs\Python\Python36-32\\Lib;C:\Users\bhudi\AppData\Local\Programs\Python\Python36-32\\DLLs;C:\Users\bhudi\AppData\Local\Programs\Python\Python36-32\\Lib\lib-tk;C:\Users\bhudi\AppData\Roaming\nvm;C:\Program Files\nodejs
10 verbose lifecycle [email protected]~start: CWD: C:\repos\test
11 silly lifecycle [email protected]~start: Args: [ '/d /s /c', 'react-scripts start' ]
12 silly lifecycle [email protected]~start: Returned: code: 3221225477 signal: null
13 info lifecycle [email protected]~start: Failed to exec start script
14 verbose stack Error: [email protected] start: `react-scripts start`
14 verbose stack Exit status 3221225477
14 verbose stack at EventEmitter.<anonymous> (C:\Users\bhudi\AppData\Roaming\nvm\v6.11.0\node_modules\npm\lib\utils\lifecycle.js:279:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess.<anonymous> (C:\Users\bhudi\AppData\Roaming\nvm\v6.11.0\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:891:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid [email protected]
16 verbose cwd C:\repos\test
17 verbose Windows_NT 10.0.15063
18 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
19 verbose node v6.11.0
20 verbose npm v4.6.1
21 error code ELIFECYCLE
22 error errno 3221225477
23 error [email protected] start: `react-scripts start`
23 error Exit status 3221225477
24 error Failed at the [email protected] start script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 3221225477, true ]
yarn start:
yarn start v0.24.6
$ react-scripts start
error Command failed with exit code 3221225477.
*note: I use nvm and have tried with multiple versions, and nothing has helped. I've also uninstalled node and reinstalled, cleared cache, but it doesn't seem to work.
node -v: 6.11.0npm -v: 4.6.1yarn --version: 0.24.6npm ls react-scripts: [email protected] Then, specify:
npm install -g create-react-appcreate-react-app testcd testnpm start or yarn startExpected it to host the app at localhost:3000
{
"name": "brianhudi.rocks",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^15.6.1",
"react-dom": "^15.6.1"
},
"devDependencies": {
"react-scripts": "^1.0.7"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}
Thanks for the report.
This seems like some sort of Node/Windows compatibility issue.
Unfortunately it means this is extremely unlikely that we can fix it on our side.
As noted in https://github.com/sass/node-sass/issues/1283#issuecomment-167406260 and https://github.com/npm/npm/issues/11024 (very similar symptoms), it might be related to unusual Windows system permissions, an antivirus running, or something like this.
The specific symptom is that neither Yarn nor npm seem to be able to spawn a process.
I recommend you to file a bug with Node.js.
I'm very sorry about closing this but it's just not possible to fix here.
+1, however, vue-cli just such a great boilerplate, which doesn't come across such problem...
+1, I have this problem too.the problem is same as what hudibrian described. Is there any solution to this problem ?
Not that I'm aware of. You could try reinstalling Node, disable any antivirus software, login as system administrator, or run some tool to repair disk permissions.
after you install the new dependency,
you must run : npm install
i deleted my node_module folder and did yarn install. I also rollbacked my npm and yarn versions to more stable versions.
Probably not related at all to the OP issue. But in case anyone is using windows containers and is trying to build a cra from within in the container and stumbles on this error. Like I did. I fixed it by setting the memory limit to 2048mb instead of the default 1024mb.
docker run -m 2048mb ...
Sorry for being silent on this issue since I created it. I wasn't able to exactly pinpoint the issue but it seemed to be related to my companies access restrictions on my PC and or their antivirus.
Shortly after experiencing this issue I moved to a macbook from my windows machine, and it has worked just fine on the mac side, and in parallels on windows 10. That being said, I installed the copy of windows that is running in parallels and have full administrator rights and choice of AV and whether or not it is running.
did anyone got a solution for this? I tried using other node version , and shutdown the antivirus, that didn't work.
I've followed the same steps as @belhassen07 and got the same errors too...
deleting node modules helped in my case.
after you install the new dependency,
you must run : npm install
strrriiikkkkeee :-) via npm install (call it where the package.json file is located in your example folder)
Most helpful comment
after you install the new dependency,
you must run : npm install