mschwarzmueller / angular-2-beta-boilerplate

A basic boilerplate to start an Angular 2 (Beta) App. Includes Gulpfile to compile Typescript and SCSS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

npm start

almaz1213 opened this issue · comments

commented

hi,
i've installed all as in tuto http://www.youtube.com/watch?v=0scZXATiGSY&index=3&list=PL55RiY5tL51olfU2IEqr455EYLkrhmh3n on centos 6.7 x86_64
but "npm start" exit with errors. thanx.

npm-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/bin/npm', 'start' ]
2 info using npm@3.7.1
3 info using node@v0.10.41
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle angular2-boilerplate@1.0.0prestart: angular2-boilerplate@1.0.0
6 silly lifecycle angular2-boilerplate@1.0.0
prestart: no script for prestart, continuing
7 info lifecycle angular2-boilerplate@1.0.0start: angular2-boilerplate@1.0.0
8 verbose lifecycle angular2-boilerplate@1.0.0
start: unsafe-perm in lifecycle true
9 verbose lifecycle angular2-boilerplate@1.0.0start: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/home/diamo/eclipse_ws/ng2/node_modules/.bin:/usr/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/diamo/bin
10 verbose lifecycle angular2-boilerplate@1.0.0
start: CWD: /home/diamo/eclipse_ws/ng2
11 silly lifecycle angular2-boilerplate@1.0.0start: Args: [ '-c', 'concurrent "npm run lite" ' ]
12 silly lifecycle angular2-boilerplate@1.0.0
start: Returned: code: 1 signal: null
13 info lifecycle angular2-boilerplate@1.0.0~start: Failed to exec start script
14 verbose stack Error: angular2-boilerplate@1.0.0 start: concurrent "npm run lite"
14 verbose stack Exit status 1
14 verbose stack at EventEmitter. (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:239:16)
14 verbose stack at EventEmitter.emit (events.js:98:17)
14 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/lib/utils/spawn.js:24:14)
14 verbose stack at ChildProcess.emit (events.js:98:17)
14 verbose stack at maybeClose (child_process.js:766:16)
14 verbose stack at Process.ChildProcess._handle.onexit (child_process.js:833:5)
15 verbose pkgid angular2-boilerplate@1.0.0
16 verbose cwd /home/diamo/eclipse_ws/ng2
17 error Linux 2.6.32-573.7.1.el6.centos.plus.x86_64
18 error argv "node" "/usr/bin/npm" "start"
19 error node v0.10.41
20 error npm v3.7.1
21 error code ELIFECYCLE
22 error angular2-boilerplate@1.0.0 start: concurrent "npm run lite"
22 error Exit status 1
23 error Failed at the angular2-boilerplate@1.0.0 start script 'concurrent "npm run lite" '.
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 angular2-boilerplate package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error concurrent "npm run lite"
23 error You can get information on how to open an issue for this project with:
23 error npm bugs angular2-boilerplate
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls angular2-boilerplate
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

commented

and in console:

[diamo@ulhikma ng2]$ npm run lite

angular2-boilerplate@1.0.0 lite /home/diamo/eclipse_ws/ng2
lite-server

Did not detect a bs-config.json or bs-config.js override file. Using lite-server defaults...
* browser-sync options **
{ injectChanges: false,
files: [ './
/.{html,htm,css,js}' ],
server: { baseDir: './', middleware: [ [Function], [Function] ] } }
[BS] Access URLs:


   Local: http://localhost:3000
External: http://10.0.2.15:3000

      UI: http://localhost:3001

UI External: http://10.0.2.15:3001


[BS] Serving files from: ./
[BS] Watching files...
16.02.09 19:38:28 200 GET /index.html
16.02.09 19:38:28 200 GET /node_modules/es6-shim/es6-shim.min.js
16.02.09 19:38:28 200 GET /node_modules/systemjs/dist/system-polyfills.js
16.02.09 19:38:28 200 GET /node_modules/systemjs/dist/system.src.js
16.02.09 19:38:29 200 GET /node_modules/angular2/bundles/angular2-polyfills.js
16.02.09 19:38:29 200 GET /node_modules/angular2/bundles/http.js
16.02.09 19:38:29 200 GET /node_modules/angular2/bundles/router.dev.js
16.02.09 19:38:30 200 GET /src/css/app.css
16.02.09 19:38:30 200 GET /node_modules/rxjs/bundles/Rx.js
16.02.09 19:38:30 200 GET /node_modules/angular2/bundles/angular2.dev.js
16.02.09 19:38:30 200 GET /app/boot.js
16.02.09 19:38:31 200 GET /app/app.component.js
16.02.09 19:38:32 404 GET /favicon.ico

events.js:72
throw er; // Unhandled 'error' event
^
Error: watch ENOSPC
at errnoException (fs.js:1031:11)
at FSWatcher.start (fs.js:1063:11)
at Object.fs.watch (fs.js:1088:11)
at createFsWatchInstance (/home/diamo/eclipse_ws/ng2/node_modules/chokidar/lib/nodefs-handler.js:37:15)
at setFsWatchListener (/home/diamo/eclipse_ws/ng2/node_modules/chokidar/lib/nodefs-handler.js:80:15)
at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/diamo/eclipse_ws/ng2/node_modules/chokidar/lib/nodefs-handler.js:228:14)
at FSWatcher.NodeFsHandler._handleFile (/home/diamo/eclipse_ws/ng2/node_modules/chokidar/lib/nodefs-handler.js:255:21)
at FSWatcher. (/home/diamo/eclipse_ws/ng2/node_modules/chokidar/lib/nodefs-handler.js:473:21)
at Object.oncomplete (fs.js:108:15)

npm ERR! Linux 2.6.32-573.7.1.el6.centos.plus.x86_64
npm ERR! argv "node" "/usr/bin/npm" "run" "lite"
npm ERR! node v0.10.41
npm ERR! npm v3.7.1
npm ERR! code ELIFECYCLE
npm ERR! angular2-boilerplate@1.0.0 lite: lite-server
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the angular2-boilerplate@1.0.0 lite script 'lite-server'.
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 angular2-boilerplate package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! lite-server
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular2-boilerplate
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular2-boilerplate
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/diamo/eclipse_ws/ng2/npm-debug.log

I noticed that some people seem to have problems with "npm start". Assuming that "npm install" worked correctly I hope that the answers/ suggestions provided in these links help you:

Please let me now if this fixes your problem!

commented

i found out that this problem comes from starting lite-server. i use centos 6, and i haven't solved the issue. i decided to use apache web-server instead lite-server. i corrected package.json (deleting "npm run lite") and start local apache web server. now,
$ npm start
starts only tsc as watcher and all work simillar with tuto. but i prefer to do
$ tsc -w
being in the project dir instead
$ npm start

package.json:
{
"name": "angular2-boilerplate",
"version": "1.0.0",
"scripts": {
"tsc": "tsc",
"tsc:w": "tsc -w",
"lite": "lite-server",
"start": "concurrent "npm run tsc:w""
},
"license": "ISC",
"dependencies": {
"angular2": "2.0.0-beta.3",
"systemjs": "0.19.6",
"es6-promise": "^3.0.2",
"es6-shim": "^0.33.3",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.0",
"zone.js": "0.5.11"
},
"devDependencies": {
"concurrently": "^1.0.0",
"lite-server": "^2.0.1",
"typescript": "^1.7.5"

Yes, it comes from starting the lite server. However in the links I posted, other people were having problems with lite server as well. Maybe the solutions to their issues help you, too.

The alteration of inotify user watches in this answer worked for me. Mint 17.3
http://stackoverflow.com/a/35317737/229896

Tried npm install in Administrative Mode and it's good now..

commented

i have just solved it in centos 6. the reason is that gulp/watcher need more memo.
add a string fs.inotify.max_user_watches = 524288 into /etc/sysctl.conf.
and restart os or sudo sysctl -p

This is my pacakge.json scripts how do i do the same with gulp ?

"scripts": {
"lite": "lite-server",
"gulp": "gulp",
"start": "concurrent "npm run gulp" "npm run lite" "
},