mgechev / angular-seed

🌱 [Deprecated] Extensible, reliable, modular, PWA ready starter project for Angular (2 and beyond) with statically typed build and AoT compilation
https://mgechev.github.io/angular-seed
MIT License
4.57k stars 1.45k forks source link

Npm postinstall issue with latest git pull #451

Closed donskifarrell closed 8 years ago

donskifarrell commented 8 years ago

Hi,

I'm having an issue when running npm install on the latest git repo code (i've also deleted node_modules folder completely in trying to resolve this issue).

I'm using node 5.1.0 and npm 3.3.12 - are these versions supported?

Here is the npm debug log with some more info:

92190 silly lifecycle angular2-seed@0.0.0~install: no script for install, continuing 92191 silly postinstall angular2-seed@0.0.0 /Users/donski/Dropbox/dev/Playground/angular2-seed/angular2-seed-6ec1ca0c09e99064d5ef34042c2dd07a 92192 info lifecycle angular2-seed@0.0.0~postinstall: angular2-seed@0.0.0 92193 verbose lifecycle angular2-seed@0.0.0~postinstall: unsafe-perm in lifecycle true 92194 verbose lifecycle angular2-seed@0.0.0~postinstall: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/donski/Dropbox/dev/Playground/angular2-seed/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin 92195 verbose lifecycle angular2-seed@0.0.0~postinstall: CWD: /Users/donski/Dropbox/dev/Playground/angular2-seed 92196 silly lifecycle angular2-seed@0.0.0~postinstall: Args: [ '-c', 92196 silly lifecycle 'typings install && npm run clean-ng2 && gulp check.versions && gulp postinstall' ] 92197 silly lifecycle angular2-seed@0.0.0~postinstall: Returned: code: 1 signal: null 92198 info lifecycle angular2-seed@0.0.0~postinstall: Failed to exec postinstall script 92199 verbose stack Error: angular2-seed@0.0.0 postinstall: typings install && npm run clean-ng2 && gulp check.versions && gulp postinstall 92199 verbose stack Exit status 1 92199 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:232:16) 92199 verbose stack at emitTwo (events.js:87:13) 92199 verbose stack at EventEmitter.emit (events.js:172:7) 92199 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14) 92199 verbose stack at emitTwo (events.js:87:13) 92199 verbose stack at ChildProcess.emit (events.js:172:7) 92199 verbose stack at maybeClose (internal/child_process.js:818:16) 92199 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) 92200 verbose pkgid angular2-seed@0.0.0 92201 verbose cwd /Users/donski/Dropbox/dev/Playground/angular2-seed 92202 error Darwin 15.3.0 92203 error argv "/usr/local/Cellar/node/5.1.0/bin/node" "/usr/local/bin/npm" "install" 92204 error node v5.1.0 92205 error npm v3.3.12 92206 error code ELIFECYCLE 92207 error angular2-seed@0.0.0 postinstall: typings install && npm run clean-ng2 && gulp check.versions && gulp postinstall 92207 error Exit status 1 92208 error Failed at the angular2-seed@0.0.0 postinstall script 'typings install && npm run clean-ng2 && gulp check.versions && gulp postinstall'. 92208 error Make sure you have the latest version of node.js and npm installed. 92208 error If you do, this is most likely a problem with the angular2-seed package, 92208 error not with npm itself. 92208 error Tell the author that this fails on your system: 92208 error typings install && npm run clean-ng2 && gulp check.versions && gulp postinstall 92208 error You can get their info via: 92208 error npm owner ls angular2-seed 92208 error There is likely additional logging output above. 92209 verbose exit [ 1, true ]

Anybody experienced this issue or have clues on how to proceed?

mgechev commented 8 years ago

May be you also need to clean the typings directory. You were trying to upgrade a project you already have with the latest version of the seed?

Try a fresh angular2-seed clone and run npm install. Let me know wha the result is and if you get the same error.

gustavolira commented 8 years ago

I just tried with a fresh angular2-seed clone and npm install works ok, but when I try to use npm start I am receiving the following erros: `root@ubuntu-4gb-nyc3-01:~/angular2-seed# npm start

angular2-seed@0.0.0 start /root/angular2-seed gulp serve --env dev

[14:15:33] Requiring external module ts-node/register

⨯ Unable to compile TypeScript

gulpfile.ts (1,23): Cannot find module 'gulp'. (2307) tools/config.ts (1,28): Cannot find module 'fs'. (2307) tools/config.ts (2,20): Cannot find module 'yargs'. (2307) tools/config.ts (3,31): Cannot find module 'path'. (2307) tools/config.ts (14,52): Cannot find name '__dirname'. (2304) tools/config.ts (109,50): Cannot find name 'require'. (2304) tools/manual_typings/merge-stream.d.ts (2,36): Cannot find namespace 'NodeJS'. (2503) tools/manual_typings/merge-stream.d.ts (3,33): Cannot find namespace 'NodeJS'. (2503) tools/manual_typings/merge-stream.d.ts (4,17): Cannot find namespace 'NodeJS'. (2503) tools/utils.ts (9,17): Cannot find name 'require'. (2304) tools/utils/code_change_tools.ts (2,20): Cannot find module 'path'. (2307) tools/utils/code_change_tools.ts (4,30): Cannot find module 'browser-sync'. (2307) tools/utils/server.ts (1,26): Cannot find module 'express'. (2307) tools/utils/server.ts (3,30): Cannot find module 'serve-static'. (2307) tools/utils/server.ts (5,23): Cannot find module 'path'. (2307) tools/utils/server.ts (22,25): Cannot find name 'process'. (2304) tools/utils/tasks_tools.ts (1,23): Cannot find module 'gulp'. (2307) tools/utils/tasks_tools.ts (2,23): Cannot find module 'gulp-util'. (2307) tools/utils/tasks_tools.ts (3,24): Cannot find module 'chalk'. (2307) tools/utils/tasks_tools.ts (4,34): Cannot find module 'gulp-load-plugins'. (2307) tools/utils/tasks_tools.ts (5,31): Cannot find module 'run-sequence'. (2307) tools/utils/tasks_tools.ts (6,50): Cannot find module 'fs'. (2307) tools/utils/tasks_tools.ts (7,20): Cannot find module 'path'. (2307) tools/utils/tasks_tools.ts (19,10): Cannot find name 'require'. (2304) tools/utils/template_injectables.ts (4,20): Cannot find module 'path'. (2307) ` I did npm install -g ts-node

koodikindral commented 8 years ago

Same issue:

Error: Cannot find module 'browser-sync'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (C:\Projects\angular2-seed\tools\utils\code_change_tools.ts:4:24)
    at Module._compile (module.js:397:26)
    at Object.loader (C:\Projects\angular2-seed\node_modules\ts-node\src\ts-node.ts:225:14)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
mgechev commented 8 years ago

@koodikindral is it a fresh clone or you're trying to upgrade your seed?

@gustavolira @koodikindral would you send me the output of:

cd typings
tree .
koodikindral commented 8 years ago

used the fresh clone and everything works. Discard my comment :)

donskifarrell commented 8 years ago

Made a fresh clone and it's working now too with npm install and then npm start.

Other than node_modules, what other files are generated by npm install that need to be removed? Just the typings folder?

mgechev commented 8 years ago

@donskifarrell also test, tmp and dist.

gustavolira commented 8 years ago

The folder typings was not created

gustavolira commented 8 years ago

I created another user at server and now it's working