Reputation: 701
i am using latest version of angular and facing following issue when starting development server.
An unhandled exception occurred: Object prototype may only be an Object or null: undefined
See "/tmp/ng-3lbO1f/angular-errors.log" for further details.
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! [email protected] start: `ng serve --open`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] 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! /home/.npm/_logs/2020-01-31T05_05_55_332Z-debug.log
/home/.npm/_logs/2020-01-31T05_05_55_332Z-debug.log - Please find the logs
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/home/.nvm/versions/node/v12.14.1/bin/node',
1 verbose cli '/home/.nvm/versions/node/v12.14.1/bin/npm',
1 verbose cli 'start'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: /home/.nvm/versions/node/v12.14.1/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/Desktop/dump/PayAuth/node_modules/.bin:/home/.nvm/versions/node/v12.14.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin
9 verbose lifecycle [email protected]~start: CWD: /home/Desktop/dump/PayAuth
10 silly lifecycle [email protected]~start: Args: [ '-c', 'ng serve --open' ]
11 info lifecycle [email protected]~start: Failed to exec start script
12 verbose stack Error: [email protected] start: `ng serve --open`
12 verbose stack spawn ENOENT
12 verbose stack at ChildProcess.<anonymous> (/home/.nvm/versions/node/v12.14.1/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack at ChildProcess.emit (events.js:223:5)
12 verbose stack at maybeClose (internal/child_process.js:1021:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
13 verbose pkgid [email protected]
14 verbose cwd /home/Desktop/dump/PayAuth
15 verbose Linux 4.15.0-72-generic
16 verbose argv "/home/.nvm/versions/node/v12.14.1/bin/node" "/home/.nvm/versions/node/v12.14.1/bin/npm" "start"
17 verbose node v12.14.1
18 verbose npm v6.13.4
19 error code ELIFECYCLE
20 error syscall spawn
21 error file sh
22 error errno ENOENT
23 error [email protected] start: `ng serve --open`
23 error spawn ENOENT
24 error Failed at the [email protected] start script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
please find the versions of angular and other libraries
Angular CLI: 8.3.23
Node: 12.14.1
OS: linux x64
Angular: 8.2.14
... animations, common, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.803.23
@angular-devkit/build-angular 0.803.23
@angular-devkit/build-optimizer 0.803.23
@angular-devkit/build-webpack 0.803.23
@angular-devkit/core 8.3.23
@angular-devkit/schematics 8.3.23
@angular/cdk 8.2.3
@angular/cli 8.3.23
@angular/compiler 8.0.3
@angular/http 8.0.0-beta.10
@angular/material 8.2.3
@ngtools/webpack 8.3.23
@schematics/angular 8.3.23
@schematics/update 0.803.23
rxjs 6.5.4
typescript 3.5.3
webpack 4.39.2
Please help and thanks in advance.
i have tried deleting node modules and reinstalling npm packages multiple time. but that doestnot helped me
Upvotes: 1
Views: 938
Reputation: 41
Try to upgrade your @angular/compiler to the same level of other packages (8.3.23). That may cause this mis-match issue.
Upvotes: 2