I have created a Simple React App but when i am going to run it using cmd "npm start" it throws a bunch of errors. I also reinstall node js on my system and install many times node_modules. but everything gonna failed. I have also tried to run other projects on my system but I am getting almost same type of error.
C:\Users\Administrator\Desktop\reactApp>npm start
> testapp#1.0.0 start C:\Users\Administrator\Desktop\reactApp
> webpack-dev-server --mode development --open --hot
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm#6.8.0
3 info using node#v11.10.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle testapp#1.0.0~prestart: testapp#1.0.0
6 info lifecycle testapp#1.0.0~start: testapp#1.0.0
7 verbose lifecycle testapp#1.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle testapp#1.0.0~start: PATH: C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Administrator\Desktop\reactApp\node_modules\.bin;C:\Users\Administrator\AppData\Roaming\npm;C:\Program Files\nodejs\;C:\Program Files\Microsoft MPI\Bin\;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Program Files\TortoiseSVN\bin;C:\Program Files\TortoiseGit\bin;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5.2 & MySQL Utilities 1.5.2 1.5\;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5.2 & MySQL Utilities 1.5.2 1.5\Doctrine extensions for PHP\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\dotnet\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Program Files (x86)\Yarn\bin\;C:\Program Files\nodejs\;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Users\Administrator\AppData\Roaming\npm
9 verbose lifecycle testapp#1.0.0~start: CWD: C:\Users\Administrator\Desktop\reactApp
10 silly lifecycle testapp#1.0.0~start: Args: [ '-c', 'webpack-dev-server --mode development --open --hot' ]
11 info lifecycle testapp#1.0.0~start: Failed to exec start script
12 silly lifecycle testapp#1.0.0~start: Returned: code: -4058 signal: null
13 info lifecycle testapp#1.0.0~start: Failed to exec start script
14 verbose stack Error: testapp#1.0.0 start: `webpack-dev-server --mode development --open --hot`
14 verbose stack spawn bash ENOENT
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:246:19)
14 verbose stack at onErrorNT (internal/child_process.js:427:16)
14 verbose stack at processTicksAndRejections (internal/process/next_tick.js:76:17)
15 verbose pkgid testapp#1.0.0
16 verbose cwd C:\Users\Administrator\Desktop\reactApp
17 verbose Windows_NT 10.0.17134
18 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
19 verbose node v11.10.1
20 verbose npm v6.8.0
21 error file bash
22 error path bash
23 error code ELIFECYCLE
24 error errno ENOENT
25 error syscall spawn bash
26 error testapp#1.0.0 start: `webpack-dev-server --mode development --open --hot`
26 error spawn bash ENOENT
27 error Failed at the testapp#1.0.0 start script.
27 error This is probably not a problem with npm. There is likely additional logging output above.
28 verbose exit [ 1, true ]
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2019-03-06T12_08_45_188Z-debug.log
C:\Users\Administrator\Desktop\reactApp>
I think you forgot to either run npm install in your project directory or forgot to install webpack-dev-server before running npm start.
This issue on GitHub has pretty much the exact same error with the same solution: https://github.com/vuejs/vue-cli/issues/486
I think the best solution to this problem is to go to the following path first and apply these changes, and then restart your system and try again.
Control Panel>System and Security>System>Advance system setting>Enviroment variable and set system variables path C:\Windows\System32\ variable and restart your System.
Related
Approx 50% of my hosted builds are failing with npm error 134. I am building the same commit with the same build definition using hosted vs2017. I am building an Angular Application using the Angular CLI. The npm task calls 'run build' which is defined as "ng build --prod" in my package.json. Both a successful build and failed build are using npm task version 1.1.49 and npm verion 6.8. This leads me to believe it is something related to the hosted environment. The hosted vs2017 and vs2019 agents fail almost all of the time. While the windows container agent fails about 50% of the time.
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! my-app#1.0.0 build: `ng build --prod`
npm ERR! Exit status 134
npm ERR!
npm ERR! Failed at the my-app#1.0.0 build 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:\npm\cache\_logs\TimeStampHere-debug.log
Found npm debug log, make sure the path matches with the one in npm's output: C:\npm\cache\_logs\TimeStampHere-debug.log
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\npm\\prefix\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'build' ]
2 info using npm#6.8.0
3 info using node#v10.15.2
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle my-app#1.0.0~prebuild: my-app#1.0.0
6 info lifecycle my-app#1.0.0~build: my-app#1.0.0
7 verbose lifecycle my-app#1.0.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle my-app#1.0.0~build: PATH: C:\npm\prefix\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;d:\a\1\s\ngmyapp\node_modules\.bin;C:\agents\2.149.2\externals\git\cmd;C:/hostedtoolcache/windows/Python/3.6.8/x64;C:/hostedtoolcache/windows/Python/3.6.8/x64/Scripts;C:\vcpkg;C:\cf-cli;C:\Program Files (x86)\NSIS\;C:\Program Files\Boost\1.69.0;C:\Users\VssAdministrator\.dotnet\tools;C:\Program Files\dotnet;C:\mysql-5.7.21-winx64\bin;C:\Program Files\Java\zulu-8-azure-jdk_8.36.0.1-8.0.202-win_x64\bin;C:\npm\prefix;C:\hostedtoolcache\windows\Ruby\2.5.0\x64\bin;C:\Go1.11.5\bin;C:\Program Files\Git\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Scripts;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64;C:\Program Files\Microsoft MPI\Bin\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\Chocolatey\bin;C:\Program Files\Docker;C:\Program Files\PowerShell\6\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;c:\tools\php;C:\Program Files (x86)\Subversion\bin;C:\Program Files\nodejs\;C:\Program Files\CMake\bin;C:\Program Files\Mercurial;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Program Files\OpenSSL\bin;C:\Users\VssAdministrator\AppData\Local\Microsoft\WindowsApps;
9 verbose lifecycle my-app#1.0.0~build: CWD: d:\a\1\s\ngmyapp
10 silly lifecycle my-app#1.0.0~build: Args: [ '/d /s /c', 'ng build --prod' ]
11 silly lifecycle my-app#1.0.0~build: Returned: code: 134 signal: null
12 info lifecycle my-app#1.0.0~build: Failed to exec build script
13 verbose stack Error: my-app#1.0.0 build: `ng build --prod`
13 verbose stack Exit status 134
13 verbose stack at EventEmitter.<anonymous> (C:\npm\prefix\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:189:13)
13 verbose stack at ChildProcess.<anonymous> (C:\npm\prefix\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:189:13)
13 verbose stack at maybeClose (internal/child_process.js:970:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid my-app#1.0.0
15 verbose cwd d:\a\1\s\myapp
16 verbose Windows_NT 10.0.14393
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\npm\\prefix\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
18 verbose node v10.15.2
19 verbose npm v6.8.0
20 error code ELIFECYCLE
21 error errno 134
22 error my-app#1.0.0 build: `ng build --prod`
22 error Exit status 134
23 error Failed at the my-app#1.0.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 134, true ]
##[error]Error: Npm failed with return code: 134
##[section]Finishing: npm build
EDIT: I have configured a build agent on premise and I am not running into the issue.
It seems the root of issue is with node.js running out of memory.
https://github.com/angular/angular-cli/issues/13734
The suggested work around is to change a environment variable:
node --max_old_space_size=8192 node_modules/#angular/cli/bin/ng build --prod
In our case we use Jenkins build server but get the same error. I solved it by swithing the logging of the build progress off with the progress=false option.
Our SPA is hosted in a Visual Studio project so the option is added to the build command in the *.csproj file
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build -- --prod --progress=false" />
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build:ssr -- --prod --progress=false" Condition=" '$(BuildServerSideRenderer)' == 'true' " />
I am trying to build a REACTJS project from within PHPStorm. The developer tells me it builds fine on their environment. It had been building fine for me too, but now I get the following error:
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! #genesisui/react#1.8.11 build: `webpack -p --progress --env.prod`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the #genesisui/react#1.8.11 build 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\Robert\AppData\Roaming\npm-cache\_logs\2018-06-08T03_10_46_084Z-debug.log
Process finished with exit code 2
The errors above this output are:
ERROR in index.bundle.js from UglifyJs
Unexpected token: name (context) [./node_modules/striptags/src/striptags.js:26,0][index.bundle.js:112143,12]
ERROR in index.bundle.js from UglifyJs
Unexpected token: name (context) [./node_modules/striptags/src/striptags.js:26,0][index.bundle.js:112143,12]
The full npm-debug.log is:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files (x86)\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'build',
1 verbose cli '--scripts-prepend-node-path=auto' ]
2 info using npm#6.1.0
3 info using node#v10.4.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle #genesisui/react#1.8.11~prebuild: #genesisui/react#1.8.11
6 info lifecycle #genesisui/react#1.8.11~build: #genesisui/react#1.8.11
7 verbose lifecycle #genesisui/react#1.8.11~build: unsafe-perm in lifecycle true
8 verbose lifecycle #genesisui/react#1.8.11~build: PATH: C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Robert\Projects\my-project\client\node_modules\.bin;C:\Program Files\Docker\Docker\Resources\bin;C:\Python27\;C:\Python27\Scripts;C:\ProgramData\Oracle\Java\javapath;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\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Microsoft\Web Platform Installer\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;c:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files\Microsoft SQL Server\110\DTS\Binn\;c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\;c:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\xampp\mysql\bin\;C:\Users\Robert\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\GitExtensions\;C:\xampp\php;C:\ProgramData\ComposerSetup\bin;C:\Program Files (x86)\Amazon\AWSCLI\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\nodejs\
9 verbose lifecycle #genesisui/react#1.8.11~build: CWD: C:\Users\Robert\Projects\my-project\client
10 silly lifecycle #genesisui/react#1.8.11~build: Args: [ '/d /s /c', 'webpack -p --progress --env.prod' ]
11 silly lifecycle #genesisui/react#1.8.11~build: Returned: code: 2 signal: null
12 info lifecycle #genesisui/react#1.8.11~build: Failed to exec build script
13 verbose stack Error: #genesisui/react#1.8.11 build: `webpack -p --progress --env.prod`
13 verbose stack Exit status 2
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:304:16)
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:961:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
14 verbose pkgid #genesisui/react#1.8.11
15 verbose cwd C:\Users\Robert\Projects\my-project\client
16 verbose Windows_NT 10.0.17134
17 verbose argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build" "--scripts-prepend-node-path=auto"
18 verbose node v10.4.0
19 verbose npm v6.1.0
20 error code ELIFECYCLE
21 error errno 2
22 error #genesisui/react#1.8.11 build: `webpack -p --progress --env.prod`
22 error Exit status 2
23 error Failed at the #genesisui/react#1.8.11 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]
Can anyone point me in the right direction to resolve this?
EDIT
I posted an outdated npm-debug.log initially. Question now includes correct log.
Aa suggested in the log, you can try to update your node as well as your npm to the latest versions and try building again after removing the node_modules
Good day everyone!
On package.json, I have a line under scripts that reads "serve": "node index -test". If I run node index -test directly in the Node command prompt, the error doesn't occur. If I run npm run serve, which is suppose to do the same thing, the error occurs when I stop the process with Ctrl+C. Here's the log:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\SOUSA\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'serve' ]
2 info using npm#6.0.1
3 info using node#v10.1.0
4 verbose run-script [ 'preserve', 'serve', 'postserve' ]
5 info lifecycle alloy-server#3.0.0~preserve: alloy-server#3.0.0
6 info lifecycle alloy-server#3.0.0~serve: alloy-server#3.0.0
7 verbose lifecycle alloy-server#3.0.0~serve: unsafe-perm in lifecycle true
8 verbose lifecycle alloy-server#3.0.0~serve: PATH: C:\Users\SOUSA\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Alloy_Server_v3\node_modules\.bin;C:\Users\SOUSA\AppData\Roaming\npm;C:\Program Files\nodejs\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\ImageMagick-6.9.3-Q16;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\ImageMagick-6.9.1-Q16;C:\Program Files\ImageMagick-6.9.0-Q16;C:\Program Files (x86)\Common Files\Intel\Shared Files\cpp\bin\Intel64;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\git\cmd;C:\Program Files (x86)\Windows Live\Shared;C:\ProgramData\chocolatey\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Git\cmd;C:\Program Files\PuTTY\;C:\Program Files\nodejs\;C:\Users\SOUSA\.cargo\bin;C:\NVPACK\gradle-2.9\bin;C:\NVPACK\jdk1.8.0_77\bin;C:\Users\SOUSA\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Microsoft VS Code\bin;C:\Users\SOUSA\AppData\Local\Microsoft\WindowsApps;C:\Users\SOUSA\AppData\Roaming\npm
9 verbose lifecycle alloy-server#3.0.0~serve: CWD: C:\Alloy_Server_v3
10 silly lifecycle alloy-server#3.0.0~serve: Args: [ '/d /s /c', 'node index -test' ]
11 silly lifecycle alloy-server#3.0.0~serve: Returned: code: 3221225786 signal: null
12 info lifecycle alloy-server#3.0.0~serve: Failed to exec serve script
13 verbose stack Error: alloy-server#3.0.0 serve: `node index -test`
13 verbose stack Exit status 3221225786
13 verbose stack at EventEmitter.<anonymous> (C:\Users\SOUSA\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:283:16)
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\SOUSA\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:957:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:246:5)
14 verbose pkgid alloy-server#3.0.0
15 verbose cwd C:\Alloy_Server_v3
16 verbose Windows_NT 10.0.16299
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\SOUSA\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "serve"
18 verbose node v10.1.0
19 verbose npm v6.0.1
20 error code ELIFECYCLE
21 error errno 3221225786
22 error alloy-server#3.0.0 serve: `node index -test`
22 error Exit status 3221225786
23 error Failed at the alloy-server#3.0.0 serve script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 3221225786, true ]
Things that I tried to no avail:
This answer
Running the node command prompt as administrator
Creating a new folder, copying source files there and running npm install
I have been looking for more information on this Exit status 3221225786, but after three hours I still can't solve the problem. Any help is much appreciated.
EDIT: the error also doesn't happen when I user the VS Code console. It only happens with the Node.js command prompt.
In case someone stumbles across the same error, the problem went away when I updated to Node 10.2.0 and NPM 6.0.1. So I guess updating, or maybe fresh installing, can solve it.
I have a React-Redux web app running in typescript. Everything works fine but after I installed Azure (npm install azure) and tried to include it in a file like so: const Azure = import('azure')
When I try to run npm start webpack seems to be trying to compile the typescript to javascri[t but gets stuck at around 69% where it goes between 69 and 68% for a long time then goes up to 92% then is stuck there too.
This is the error log I get:
0 info it worked if it ends with ok 1 verbose cli [ 'C:\Program
Files\nodejs\node.exe', 1 verbose cli
'C:\Users\admin\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'start' ] 2 info using npm#5.6.0 3 info using
node#v8.9.1 4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle react-redux-typescript-boilerplate#0.0.0~prestart:
react-redux-typescript-boilerplate#0.0.0 6 info lifecycle
react-redux-typescript-boilerplate#0.0.0~start:
react-redux-typescript-boilerplate#0.0.0 7 verbose lifecycle
react-redux-typescript-boilerplate#0.0.0~start: unsafe-perm in
lifecycle true 8 verbose lifecycle
react-redux-typescript-boilerplate#0.0.0~start: PATH:
C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;W:\myproject-next\DeansOffice\node_modules.bin;C:\Program
Files\ImageMagick-7.0.7-Q16;C:\Program
Files\Docker\Docker\Resources\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program
Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Microsoft
SQL Server\120\Tools\Binn\;C:\Program Files
(x86)\GtkSharp\2.12\bin;C:\Program Files (x86)\Skype\Phone\;C:\Program
Files\7-Zip\;W:\SDKs\Android\sdk\platform-tools;C:\Program
Files\Common Files\Autodesk Shared\;C:\Program Files
(x86)\Autodesk\Backburner\;C:\Program Files (x86)\Windows
Live\Shared;C:\Program Files\Microsoft SQL
Server\130\Tools\Binn\;C:\Program
Files\Java\jre1.8.0_92\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program
Files (x86)\Microsoft SQL Server\110\Tools\Binn\;C:\Program
Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft
SQL Server\110\DTS\Binn\;C:\Program Files\dotnet\;C:\Program
Files\Git\cmd;C:\Program Files (x86)\Microsoft SQL Server\Client
SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL
Server\140\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL
Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL
Server\140\Tools\Binn\ManagementStudio\;C:\Program
Files\PuTTY\;C:\Program Files\TortoiseGit\bin;C:\Program
Files\nodejs\;C:\Program
Files\Amazon\AWSCLI\;C:\Users\admin\AppData\Local\Programs\Python\Python36-32\Scripts\;C:\Users\admin\AppData\Local\Programs\Python\Python36-32\;C:\Users\admin\AppData\Local\Android\sdk\platform-tools;C:\Users\admin\AppData\Local\Microsoft\WindowsApps;C:\Users\admin\AppData\Roaming\npm;C:\Program
Files\Microsoft VS Code\bin;C:\Users\admin\AppData\Local\Google\Cloud
SDK\google-cloud-sdk\bin 9 verbose lifecycle
react-redux-typescript-boilerplate#0.0.0~start: CWD:
W:\myproject-next\DeansOffice 10 silly lifecycle
react-redux-typescript-boilerplate#0.0.0~start: Args: [ '/d /s /c', 10
silly lifecycle 'webpack-dev-server --progress --colors --inline
--watch' ] 11 silly lifecycle react-redux-typescript-boilerplate#0.0.0~start: Returned: code: 3
signal: null 12 info lifecycle
react-redux-typescript-boilerplate#0.0.0~start: Failed to exec start
script 13 verbose stack Error:
react-redux-typescript-boilerplate#0.0.0 start: webpack-dev-server
--progress --colors --inline --watch 13 verbose stack Exit status 3 13 verbose stack at EventEmitter.
(C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:285:16)
13 verbose stack at emitTwo (events.js:126:13) 13 verbose stack
at EventEmitter.emit (events.js:214:7) 13 verbose stack at
ChildProcess.
(C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13) 13 verbose stack
at ChildProcess.emit (events.js:214:7) 13 verbose stack at
maybeClose (internal/child_process.js:925:16) 13 verbose stack at
Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid react-redux-typescript-boilerplate#0.0.0 15 verbose
cwd W:\myproject-next\DeansOffice 16 verbose Windows_NT 10.0.16299 17
verbose argv "C:\Program Files\nodejs\node.exe"
"C:\Users\admin\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js"
"start" 18 verbose node v8.9.1 19 verbose npm v5.6.0 20 error code
ELIFECYCLE 21 error errno 3 22 error
react-redux-typescript-boilerplate#0.0.0 start: webpack-dev-server
--progress --colors --inline --watch 22 error Exit status 3 23 error Failed at the react-redux-typescript-boilerplate#0.0.0 start script.
23 error This is probably not a problem with npm. There is likely
additional logging output above. 24 verbose exit [ 3, true ]
Looks like the azure npm package does not work with browserify hence the issues.
I'm having some problems after the update to angular4. When i try to run npm start i'll receive this errors. I Try to update npm and to reinstall all the packages. What am I missing?
I'm using: npm#4.1.2 and node#v7.5.0 and tsc 2.2.1.
0 info it worked if it ends with ok
1 verbose cli [ 'c:\\Program Files (x86)\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\Carlo\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm#4.1.2
3 info using node#v7.5.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle angular-quickstart#1.0.0~prestart: angular-quickstart#1.0.0
6 verbose lifecycle angular-quickstart#1.0.0~prestart: unsafe-perm in lifecycle true
7 verbose lifecycle angular-quickstart#1.0.0~prestart: PATH: C:\Users\Carlo\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;h:\Dev\it-food-delivery-web\source\node_modules\.bin;c:\Users\Carlo\bin;.;C:\Program Files (x86)\Git\local\bin;C:\Program Files (x86)\Git\mingw\bin;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\bin;c:\Python27\;c:\Python27\Scripts;c:\ProgramData\Oracle\Java\javapath;c:\Ruby22\bin;c:\Program Files (x86)\Lenovo\FusionEngine;c:\Program Files (x86)\Intel\iCLS Client\;c:\Program Files\Intel\iCLS Client\;c:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;c:\WINDOWS\system32;c:\WINDOWS;c:\WINDOWS\System32\Wbem;c:\WINDOWS\System32\WindowsPowerShell\v1.0\;c:\Program Files\Intel\Intel(R) Management Engine Components\DAL;c:\Program Files\Intel\Intel(R) Management Engine Components\IPT;c:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;c:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;c:\Program Files (x86)\Common Files\lenovo\easyplussdk\bin;C:\Program Files (x86)\Git\cmd;c:\Program Files\OpenVPN\bin;c:\xampp\php;c:\ProgramData\ComposerSetup\bin;c:\Users\Carlo\.dnx\bin;c:\Program Files\Microsoft DNX\Dnvm\;c:\Program Files\Microsoft SQL Server\120\Tools\Binn\;c:\Program Files (x86)\MiKTeX 2.9\miktex\bin\;c:\WINDOWS\system32;c:\WINDOWS;c:\WINDOWS\System32\Wbem;c:\WINDOWS\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\Skype\Phone\;c:\Program Files (x86)\PostgreSQL\9.4\bin;c:\Program Files (x86)\PostgreSQL\9.4\lib;c:\Program Files (x86)\Windows Live\Shared;c:\Program Files\Microsoft SQL Server\130\Tools\Binn\;c:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;c:\Program Files\dotnet\;c:\Program Files\Git\cmd;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files (x86)\nodejs\;h:\Dev;c:\Users\Carlo\.dnx\runtimes\dnx-clr-win-x86.1.0.0-rc1-update2\bin;c:\Users\Carlo\.k\runtimes\kre-clr-win-x86.1.0.0-beta3\bin;c:\Users\Carlo\.k\bin;c:\Users\Carlo\.dnx\bin;c:\Users\Carlo\AppData\Local\Pandoc\;c:\Program Files (x86)\Microsoft VS Code\bin;c:\Program Files\Docker Toolbox;c:\Users\Carlo\AppData\Roaming\Composer\vendor\bin;c:\Users\Carlo\AppData\Local\Microsoft\WindowsApps;c:\Program Files (x86)\GnuWin32\bin;c:\Users\Carlo\AppData\Roaming\npm
8 verbose lifecycle angular-quickstart#1.0.0~prestart: CWD: h:\Dev\it-food-delivery-web\source
9 silly lifecycle angular-quickstart#1.0.0~prestart: Args: [ '/d /s /c', 'npm run build' ]
10 silly lifecycle angular-quickstart#1.0.0~prestart: Returned: code: 2 signal: null
11 info lifecycle angular-quickstart#1.0.0~prestart: Failed to exec prestart script
12 verbose stack Error: angular-quickstart#1.0.0 prestart: `npm run build`
12 verbose stack Exit status 2
12 verbose stack at EventEmitter.<anonymous> (C:\Users\Carlo\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:279:16)
12 verbose stack at emitTwo (events.js:106:13)
12 verbose stack at EventEmitter.emit (events.js:192:7)
12 verbose stack at ChildProcess.<anonymous> (C:\Users\Carlo\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:40:14)
12 verbose stack at emitTwo (events.js:106:13)
12 verbose stack at ChildProcess.emit (events.js:192:7)
12 verbose stack at maybeClose (internal/child_process.js:890:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
13 verbose pkgid angular-quickstart#1.0.0
14 verbose cwd h:\Dev\it-food-delivery-web\source
15 error Windows_NT 10.0.14393
16 error argv "c:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\Carlo\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
17 error node v7.5.0
18 error npm v4.1.2
19 error code ELIFECYCLE
20 error angular-quickstart#1.0.0 prestart: `npm run build`
20 error Exit status 2
21 error Failed at the angular-quickstart#1.0.0 prestart script 'npm run build'.
21 error Make sure you have the latest version of node.js and npm installed.
21 error If you do, this is most likely a problem with the angular-quickstart package,
21 error not with npm itself.
21 error Tell the author that this fails on your system:
21 error npm run build
21 error You can get information on how to open an issue for this project with:
21 error npm bugs angular-quickstart
21 error Or if that isn't available, you can get their info via:
21 error npm owner ls angular-quickstart
21 error There is likely additional logging output above.
22 verbose exit [ 1, true ]
Solution found.
I run the command: tsc -p src/
and my code is importing
import {isPresent} from '#angular/compiler/src/facade/lang';
I have removed thi unused line and now it's working