React native error while running a sample application on a device - node.js

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

Related

Angular running error Object prototype may only be an Object or null: undefined

I have Angular application with several npm dependency in package.json. When i try to install the npm dependency npm i getting some sha1 seems to be corrupted issue. For that I delete the package-lock.json and then i can install all the npm dependency successfully. But npm start can't able to run the application showing error as
An unhandled exception occurred: Object prototype may only be an Object or null: undefined
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.15.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle ruf-stable#0.0.0~prestart: ruf-stable#0.0.0
6 info lifecycle ruf-stable#0.0.0~start: ruf-stable#0.0.0
7 verbose lifecycle ruf-stable#0.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle ruf-stable#0.0.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\workspace\myworkspace\2020\fis-employee-ui\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files (x86)\Git\cmd;C:\Program Files\PuTTY\;C:\Program Files\nodejs\;C:\Program Files\Java\jdk1.8.0_212\bin;C:\Program Files\Java\jre1.8.0_212\bin;C:\Program Files (x86)\MySQL\MySQL Utilities 1.6\;C:\Users\e5608029\AppData\Local\Programs\Python\Python37\Scripts\;C:\Users\e5608029\AppData\Local\Programs\Python\Python37\;C:\Users\e5608029\AppData\Local\Microsoft\WindowsApps;C:\Users\e5608029\AppData\Roaming\npm;C:\Users\e5608029\AppData\Local\Programs\Microsoft VS Code\bin
9 verbose lifecycle ruf-stable#0.0.0~start: CWD: C:\workspace\myworkspace\2020\fis-employee-ui
10 silly lifecycle ruf-stable#0.0.0~start: Args: [ '/d /s /c',
10 silly lifecycle 'ng serve --host 0.0.0.0 --proxy-config proxy.conf.json' ]
11 info lifecycle ruf-stable#0.0.0~start: Failed to exec start script
12 verbose stack Error: ruf-stable#0.0.0 start: `ng serve --host 0.0.0.0 --proxy-config proxy.conf.json`
12 verbose stack spawn ENOENT
12 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:48:18)
12 verbose stack at ChildProcess.emit (events.js:182:13)
12 verbose stack at maybeClose (internal/child_process.js:962:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
13 verbose pkgid ruf-stable#0.0.0
14 verbose cwd C:\workspace\myworkspace\2020\fis-employee-ui
15 verbose Windows_NT 10.0.17134
16 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
17 verbose node v10.15.0
18 verbose npm v6.4.1
19 error file C:\windows\system32\cmd.exe
20 error code ELIFECYCLE
21 error errno ENOENT
22 error syscall spawn
23 error ruf-stable#0.0.0 start: `ng serve --host 0.0.0.0 --proxy-config proxy.conf.json`
23 error spawn ENOENT
24 error Failed at the ruf-stable#0.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 ]
Try npm install again after deleting the existing file. then retry npm start. if still not working try to upgrade your project by 'ng update #angular/cli #angular/core' Command.
you have to do few more changed as mentioned here

NG Build fails in Azure Pipelines with NPM error 134

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' " />

Why does node.js install two 'node_modules' folders?

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.

Node ends with error Exit status 3221225786

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.

Angular4 npm start not running anymore

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

Resources