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' " />
Related
I tried to install the reactive native in windows 10, then I created a sample project and try to run it on a device but I am getting error and was unable to load to the device.
I tried most of all the areas mentioned in stack overflow, bot still unable to load the app to the device.
When I run that I got the message as
**
# start C:\Users\Bodha PC - 1\Videos\rn\revi-proj
expo start Starting project at C:\Users\Bodha PC - 1\Videos\rn\revi-proj Expo DevTools is running at
http://localhost:19002 Opening DevTools in the browser... (press
shift-d to disable) error Invalid regular expression:
/(.\__fixtures__\.|node_modules[\]react[\]dist[\].|website\node_modules\.|heapCapture\bundle.js|.\__tests__\.)$/:
Unterminated character class. Run CLI with --verbose flag for more
details. Metro Bundler process exited with code 1 Set EXPO_DEBUG=true
in your env to view the stack trace. npm ERR! code ELIFECYCLE npm ERR!
errno 1 npm ERR! # start: expo start npm ERR! Exit status 1 npm ERR!
npm ERR! Failed at the # 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\Bodha PC -
1\AppData\Roaming\npm-cache_logs\2019-10-29T05_23_21_908Z-debug.log
The log file content is 0 info it worked if it ends with ok 1 verbose
cli [ 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' 1 verbose cli ] 2 info using npm#6.12.0 3 info
using node#v13.0.1 4 verbose run-script [ 'prestart', 'start',
'poststart' ] 5 info lifecycle #~prestart: # 6 info lifecycle #~start:
# 7 verbose lifecycle #~start: unsafe-perm in lifecycle true 8 verbose
lifecycle #~start: PATH: C:\Program
Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Bodha
PC -
1\Videos\rn\revi-proj\node_modules.bin;C:\Python27\;C:\Python27\Scripts;"C:\Program
Files (x86)\Common Files\Oracle\Java\javapath;C:\Program
Files\Java\jdk1.8.0_221\bin;C:\Program
Files\Java\jre1.8.0_221\bin";C:\Program Files (x86)\Intel\Intel(R)
Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R)
Management Engine
Components\iCLS\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;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:\Python27\Scripts;C:\Program
Files\Java\jre1.8.0_221\bin;C:\Python27;C:\ProgramData\chocolatey\bin;C:\Program
Files\nodejs\;c:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk\platform-tools;C:\Program
Files\Intel\WiFi\bin\;C:\Program Files\Common
Files\Intel\WirelessCommon\;C:\Users\Bodha PC -
1\AppData\Local\watchman;C:\Users\Bodha PC -
1\AppData\Local\Microsoft\WindowsApps;C:\Users\Bodha PC -
1\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program
Files\JetBrains\PyCharm Community Edition 2019.2.1\bin;C:\Users\Bodha
PC - 1\AppData\Roaming\npm 9 verbose lifecycle #~start: CWD:
C:\Users\Bodha PC - 1\Videos\rn\revi-proj 10 silly lifecycle #~start:
Args: [ '/d /s /c', 'expo start' ] 11 silly lifecycle #~start:
Returned: code: 1 signal: null 12 info lifecycle #~start: Failed to
exec start script 13 verbose stack Error: # start: expo start 13
verbose stack Exit status 1 13 verbose stack at
EventEmitter. (C:\Program
Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:210:5) 13 verbose
stack at ChildProcess. (C:\Program
Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:210:5) 13 verbose
stack at maybeClose (internal/child_process.js:1028:16) 13 verbose
stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:283:5) 14 verbose pkgid # 15 verbose cwd
C:\Users\Bodha PC - 1\Videos\rn\revi-proj 16 verbose Windows_NT
10.0.18362 17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js"
"start" 18 verbose node v13.0.1 19 verbose npm v6.12.0 20 error code
ELIFECYCLE 21 error errno 1 22 error # start: expo start 22 error
Exit status 1 23 error Failed at the # start script. 23 error This is
probably not a problem with npm. There is likely additional logging
output above. 24 verbose exit [ 1, true ]
**
I tried most of all steps as told by others in stackoverflow, but still not working
The screen when I try it on a device is shown below,
So can any one help me with this.
enter image description here
So I had an old version of a project on one machine in regards to a project that is a github repo being worked on using a different machine.
So I deleted the folder of the old version on the first machine (backed up to a local folder beforehand). Then I did git pull origin master to pull the project from the github repo. I did npm install, npm audit fix and npm audit -f fix to get rid of vulnerabilities.
This project uses webpack and vue-cli so I put npm run dev into the terminal and now I'm getting an error without any information about why the error is happening.
Here is the github repo, follow the steps I just described to reproduce.
https://github.com/adamcole123/pharaoh-web-app
Thanks in advance!
EDITS:
I feel like it may be something to do with global dependencies, but i have no idea what they would be. So if anyone knows that would be great :)
(i forgot to add the error that i got):
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pharaoh-web-app#1.0.0 dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pharaoh-web-app#1.0.0 dev 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\Adam\AppData\Roaming\npm-cache\_logs\2019-04-06T14_44_39_545Z-debug.log
and the debug log it references:
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 'run',
1 verbose cli 'dev' ]
2 info using npm#6.4.1
3 info using node#v10.15.3
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle pharaoh-web-app#1.0.0~predev: pharaoh-web-app#1.0.0
6 info lifecycle pharaoh-web-app#1.0.0~dev: pharaoh-web-app#1.0.0
7 verbose lifecycle pharaoh-web-app#1.0.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle pharaoh-web-app#1.0.0~dev: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\nodeprojects\pharaoh-web-app\node_modules\.bin;C:\Users\Adam\AppData\Roaming\npm;C:\Program Files\nodejs\;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Adobe\AGL;C:\WINDOWS\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\Calibre2\;C:\Program Files (x86)\Brackets\command;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\PuTTY\;C:\Program Files\MATLAB\R2018b\runtime\win64;C:\Program Files\MATLAB\R2018b\bin;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Users\Adam\AppData\Local\Microsoft\WindowsApps;C:\Users\Adam\AppData\Local\Programs\Python\Python37-32;C:\Program Files\MongoDB\Server\4.0\bin;;C:\Users\Adam\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Adam\AppData\Roaming\npm
9 verbose lifecycle pharaoh-web-app#1.0.0~dev: CWD: C:\nodeprojects\pharaoh-web-app
10 silly lifecycle pharaoh-web-app#1.0.0~dev: Args: [ '/d /s /c',
10 silly lifecycle 'webpack-dev-server --inline --progress --config build/webpack.dev.conf.js' ]
11 silly lifecycle pharaoh-web-app#1.0.0~dev: Returned: code: 1 signal: null
12 info lifecycle pharaoh-web-app#1.0.0~dev: Failed to exec dev script
13 verbose stack Error: pharaoh-web-app#1.0.0 dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\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:\Program Files\nodejs\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 pharaoh-web-app#1.0.0
15 verbose cwd C:\nodeprojects\pharaoh-web-app
16 verbose Windows_NT 10.0.17134
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
18 verbose node v10.15.3
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error pharaoh-web-app#1.0.0 dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
22 error Exit status 1
23 error Failed at the pharaoh-web-app#1.0.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Please try .\node_modules\.bin\eslint (the path separator is \ on Windows) or eslint-cli.
I think this will help you:
https://github.com/eslint/eslint/issues/10176
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.
Whenever I try to run npm install or npm start I get this error:
bash: line 0: cd: packages/react-scripts: No such file or directory
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! aristophanes#1.0.0 start: `cd packages/react-scripts && node bin/react-scripts.js start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the aristophanes#1.0.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\Aristophanes\AppData\Roaming\npm-cache\_logs\2018-11-09T12_14_19_704Z-debug.log
I've no idea why I started getting it. Can anyone shed some light? I've tried uninstall and installing again but it doesn't help. Also, I don't know why but node.js installs 2 node_modules folders in my computer - one in my C://Program Files/nodejs/ directory and another in C://Users/Aristophanes/. The two package.json files in each are different.
Error log:
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 npm#6.4.1
3 info using node#v10.13.0
4 verbose config Skipping project config: C:\Users\Aristophanes/.npmrc. (matches userconfig)
5 verbose run-script [ 'prestart', 'start', 'poststart' ]
6 info lifecycle aristophanes#1.0.0~prestart: aristophanes#1.0.0
7 info lifecycle aristophanes#1.0.0~start: aristophanes#1.0.0
8 verbose lifecycle aristophanes#1.0.0~start: unsafe-perm in lifecycle true
9 verbose lifecycle aristophanes#1.0.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Aristophanes\node_modules\.bin;C:\Program Files\cmder\bin;C:\Program Files\cmder\vendor\conemu-maximus5\ConEmu\Scripts;C:\Program Files\cmder\vendor\conemu-maximus5;C:\Program Files\cmder\vendor\conemu-maximus5\ConEmu;C:\Program Files\nodejs;C:\Python27\;C:\Python27\Scripts;C:\ProgramData\Boxstarter;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:\Go\bin;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:\Users\Aristophanes\Go\bin;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Users\Aristophanes\AppData\Local\Programs\Python\Python37;C:\Users\Aristophanes\AppData\Local\Programs\Python\Python37\Scripts;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\PHP;C:\ProgramData\chocolatey\bin;C:\Program Files\Geth;C:\HashiCorp\Vagrant\bin;C:\Program Files\Git\cmd;C:\composer;C:\Users\Aristophanes\AppData\Roaming\npm;C:\Program Files\nodejs\;C:\Users\Aristophanes\AppData\Roaming\local\bin;C:\Users\Aristophanes\AppData\Local\Microsoft\WindowsApps;C:\Users\Aristophanes\AppData\Local\atom\bin;C:\Users\Aristophanes\AppData\Local\Microsoft\WindowsApps;C:\Users\Aristophanes\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Aristophanes\AppData\Local\GitHubDesktop\bin;C:\Users\Aristophanes\AppData\Roaming\Composer\vendor\bin;C:\Program Files\nodejs\bin;C:\Users\Aristophanes\AppData\Roaming\npm;C:\Program Files\Git\mingw64;C:\Program Files\Git\usr\bin;C:\Program Files\cmder
10 verbose lifecycle aristophanes#1.0.0~start: CWD: C:\Users\Aristophanes
11 silly lifecycle aristophanes#1.0.0~start: Args: [ '-c',
11 silly lifecycle 'cd packages/react-scripts && node bin/react-scripts.js start' ]
12 silly lifecycle aristophanes#1.0.0~start: Returned: code: 1 signal: null
13 info lifecycle aristophanes#1.0.0~start: Failed to exec start script
14 verbose stack Error: aristophanes#1.0.0 start: `cd packages/react-scripts && node bin/react-scripts.js start`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
14 verbose stack at EventEmitter.emit (events.js:182:13)
14 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
14 verbose stack at ChildProcess.emit (events.js:182:13)
14 verbose stack at maybeClose (internal/child_process.js:962:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
15 verbose pkgid aristophanes#1.0.0
16 verbose cwd C:\Users\Aristophanes
17 verbose Windows_NT 10.0.17134
18 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
19 verbose node v10.13.0
20 verbose npm v6.4.1
21 error code ELIFECYCLE
22 error errno 1
23 error aristophanes#1.0.0 start: `cd packages/react-scripts && node bin/react-scripts.js start`
23 error Exit status 1
24 error Failed at the aristophanes#1.0.0 start script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]
The one in C://Program Files/nodejs is the global packages that you are installing.
The one in the project are the dependencies for the project.
And this problem is probably ocurring because you are running npm install on a folder without a package.json.
I think you are having this challenge because you are not in your project folder navigate into your project folder then do your installation .just cd then the name of your app and press the enter key
// like this:
PS C:\Users\Alice\Desktop\project-folder> cd react-app
I haven't sourced any explainer as to why the two node_modules. Noticing that the one in ./Program Files/nodejs are default pkgs while those in my Users dir are 3rd party added via npm. Noticing also in the latter the presence of package-lock.json which will lock the version while the former contains only package.json.
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