Angular-cli: npm start failing at ng serve after updating to beta.30

Created on 5 Feb 2017  路  3Comments  路  Source: angular/angular-cli

Please provide us with the following information:

OS?

Windows 10

Versions.

@angular/cli: 1.0.0-beta.30
node: 6.9.5
os: win32 x64
@angular/common: 2.4.6
@angular/compiler: 2.4.6
@angular/core: 2.4.6
@angular/material: 2.0.0-beta.1
@angular/flex-layout: 2.0.0-beta.4
@angular/forms: 2.4.6
@angular/http: 2.4.6
@angular/platform-browser: 2.4.6
@angular/platform-browser-dynamic: 2.4.6
@angular/router: 3.4.6
@angular/cli: 1.0.0-beta.30
@angular/compiler-cli: 2.4.6

Repro steps.

The app was working fine in beta.26. Then I decided to upgrade to beta.30.
npm start fails at ng serve, but ng serve works when I type it directly at the command line.

The log given by the failure.

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\XXXXXXX\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'start',
1 verbose cli   '--verbose' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 silly lifecycle [email protected]~prestart: no script for prestart, continuing
7 info lifecycle [email protected]~start: [email protected]
8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~start: PATH: xxxxxxxxx
10 verbose lifecycle [email protected]~start: CWD: E:\Users\XXXXXXX\Documents\Projetos\tutoria\Bitbucket\frontend
11 silly lifecycle [email protected]~start: Args: [ '/d /s /c', 'ng serve' ]
12 silly lifecycle [email protected]~start: Returned: code: 1  signal: null
13 info lifecycle [email protected]~start: Failed to exec start script
14 verbose stack Error: [email protected] start: `ng serve`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (C:\Users\XXXXXXX\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:279:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.<anonymous> (C:\Users\XXXXXXX\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:877:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid [email protected]
16 verbose cwd E:\XXXXXX\XXXXXXX
17 error Windows_NT 10.0.14393
18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\XXXXXXX\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start" "--verbose"
19 error node v6.9.5
20 error npm  v4.1.2
21 error code ELIFECYCLE
22 error [email protected] start: `ng serve`
22 error Exit status 1
23 error Failed at the [email protected] start script 'ng serve'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the frontend package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     ng serve
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs frontend
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls frontend
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

Mention any other details that might be useful.


Thanks! We'll be in touch soon.

Most helpful comment

@julianobrasil you probably have a local version of angular-cli installed.

Make sure you remove the references to angular-cli from the devDependencies section in you package.json, then remove node_modules and npm install.

All 3 comments

@julianobrasil you probably have a local version of angular-cli installed.

Make sure you remove the references to angular-cli from the devDependencies section in you package.json, then remove node_modules and npm install.

@beeman, thanks. You're right, I had missed one reference to angular-cli.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings