kirjs / ng2-codelab

Apache License 2.0
54 stars 27 forks source link

Cannot start / build codelab #61

Closed prestonvanloon closed 7 years ago

prestonvanloon commented 7 years ago

npm -v 3.10.10

node -v v6.10.0

Steps to reproduce:

Error:

$ npm start

> codelab@0.0.0 start /Users/pvanloon/workspace/ng2-codelab
> ng serve

The "@angular/compiler-cli" package was not properly installed.
Error: The "@angular/compiler-cli" package was not properly installed.
    at Object.<anonymous> (/Users/pvanloon/workspace/ng2-codelab/node_modules/@ngtools/webpack/src/index.js:14:11)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/pvanloon/workspace/ng2-codelab/node_modules/@angular/cli/tasks/eject.js:10:19)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)

npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v6.10.0
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! codelab@0.0.0 start: `ng serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the codelab@0.0.0 start script 'ng serve'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the codelab package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ng serve
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs codelab
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls codelab
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/pvanloon/workspace/ng2-codelab/npm-debug.log

npm-debug.log:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm@3.10.10
3 info using node@v6.10.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle codelab@0.0.0~prestart: codelab@0.0.0
6 silly lifecycle codelab@0.0.0~prestart: no script for prestart, continuing
7 info lifecycle codelab@0.0.0~start: codelab@0.0.0
8 verbose lifecycle codelab@0.0.0~start: unsafe-perm in lifecycle true
9 verbose lifecycle codelab@0.0.0~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/pvanloon/workspace/ng2-codelab/node_modules/.bin:/usr/local/git/current/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/share/dotnet:/Library/Frameworks/Mono.framework/Versions/Current/Commands
10 verbose lifecycle codelab@0.0.0~start: CWD: /Users/pvanloon/workspace/ng2-codelab
11 silly lifecycle codelab@0.0.0~start: Args: [ '-c', 'ng serve' ]
12 silly lifecycle codelab@0.0.0~start: Returned: code: 1  signal: null
13 info lifecycle codelab@0.0.0~start: Failed to exec start script
14 verbose stack Error: codelab@0.0.0 start: `ng serve`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:255: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> (/usr/local/lib/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 codelab@0.0.0
16 verbose cwd /Users/pvanloon/workspace/ng2-codelab
17 error Darwin 16.4.0
18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
19 error node v6.10.0
20 error npm  v3.10.10
21 error code ELIFECYCLE
22 error codelab@0.0.0 start: `ng serve`
22 error Exit status 1
23 error Failed at the codelab@0.0.0 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 codelab 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 codelab
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls codelab
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
prestonvanloon commented 7 years ago

A lot of warnings from npm i.

npm i
npm WARN @angular/common@2.4.10 requires a peer of @angular/core@2.4.10 but none was installed.
npm WARN @angular/compiler-cli@2.4.10 requires a peer of @angular/compiler@2.4.10 but none was installed.
npm WARN @angular/compiler-cli@2.4.10 requires a peer of @angular/core@2.4.10 but none was installed.
npm WARN @angular/forms@2.4.10 requires a peer of @angular/core@2.4.10 but none was installed.
npm WARN @angular/http@2.4.10 requires a peer of @angular/core@2.4.10 but none was installed.
npm WARN @angular/platform-browser@2.4.10 requires a peer of @angular/core@2.4.10 but none was installed.
npm WARN @angular/platform-browser-dynamic@2.4.10 requires a peer of @angular/core@2.4.10 but none was installed.
npm WARN @angular/platform-browser-dynamic@2.4.10 requires a peer of @angular/compiler@2.4.10 but none was installed.
npm WARN @angular/router@3.4.10 requires a peer of @angular/core@2.4.10 but none was installed.
npm WARN codelyzer@2.0.1 requires a peer of @angular/compiler@^2.3.1 || >=4.0.0-beta <5.0.0 but none was installed.
npm WARN codelyzer@2.0.1 requires a peer of @angular/core@^2.3.1 || >=4.0.0-beta <5.0.0 but none was installed.
kirjs commented 7 years ago

Sorry, this seems like an angular-cli bug, installing an older version helped me:

npm i @angular/cli@1.0.0-rc.2
npm start
prestonvanloon commented 7 years ago

Can we pin to 1.0.0-rc.2 ?

kirjs commented 7 years ago

Feel free to do that, though I'd guess this will be fixed in the next couple of days

prestonvanloon commented 7 years ago

I'll leave this open for now and see if the next release resolves it.

prestonvanloon commented 7 years ago

New error with angular cli v1.

You seem to not be dependending on "@angular/core". This is an error.

prestonvanloon commented 7 years ago

There might be clues here: https://github.com/angular/angular-cli/wiki/stories-1.0-update