Im building a dashboard in angular 2 with ts on ubuntu 15.something but,
Im getting a npm error while compiling using npm start in the retail-dashboard folder where my typings and node-modules are located. It will open a webpage but it loads nothing error conn refused
Im at a halt right now and have no clue what to do
npm-debug.log
`0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'run', 'lite' ]
2 info using npm#3.6.0
3 info using node#v5.6.0
4 verbose run-script [ 'prelite', 'lite', 'postlite' ]
5 info lifecycle angular2-quickstart#1.0.0~prelite: angular2-quickstart#1.0.0
6 silly lifecycle angular2-quickstart#1.0.0~prelite: no script for prelite, continuing
7 info lifecycle angular2-quickstart#1.0.0~lite: angular2-quickstart#1.0.0
8 verbose lifecycle angular2-quickstart#1.0.0~lite: unsafe-perm in lifecycle true
9 verbose lifecycle angular2-quickstart#1.0.0~lite: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/home/timothy/Dev/retail-dashboard/node_modules/.bin:/usr/lib/node_modules/npm/bin/node-gyp-bin:/home/timothy/Dev/retail-dashboard/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
10 verbose lifecycle angular2-quickstart#1.0.0~lite: CWD: /home/timothy/Dev/retail-dashboard
11 silly lifecycle angular2-quickstart#1.0.0~lite: Args: [ '-c', 'lite-server' ]
12 silly lifecycle angular2-quickstart#1.0.0~lite: Returned: code: 1 signal: null
13 info lifecycle angular2-quickstart#1.0.0~lite: Failed to exec lite script
14 verbose stack Error: angular2-quickstart#1.0.0 lite: `lite-server`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:232:16)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at EventEmitter.emit (events.js:185:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:24:14)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at ChildProcess.emit (events.js:185:7)
14 verbose stack at maybeClose (internal/child_process.js:827:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid angular2-quickstart#1.0.0
16 verbose cwd /home/timothy/Dev/retail-dashboard
17 error Linux 4.2.0-27-generic
18 error argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "lite"
19 error node v5.6.0
20 error npm v3.6.0
21 error code ELIFECYCLE
22 error angular2-quickstart#1.0.0 lite: `lite-server`
22 error Exit status 1
23 error Failed at the angular2-quickstart#1.0.0 lite script 'lite-server'.
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-quickstart package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error lite-server
23 error You can get information on how to open an issue for this project with:
23 error npm bugs angular2-quickstart
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls angular2-quickstart
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]`
I had the same issue and got it working by issuing the following command:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
As explained here, the system has a limit to how many files can be watched by a user. Apparently you can run out of watches. This command increases the maximum amount of watches a user can have.
I first found the solution here, and then followed the trace to the stackoverflow post.
Hope it helps!
Related
When i run my react node project in my ubuntu system with command npm run dev, It gives me error log and it doesn't opening in my browser, even when i try to open it with localhost:3000 it doesn't working, here is my error log, can anyone please look in it and give me proper solution ?
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'client' ]
2 info using npm#3.5.2
3 info using node#v8.10.0
4 verbose run-script [ 'preclient', 'client', 'postclient' ]
5 info lifecycle mern-auth#1.0.0~preclient: mern-auth#1.0.0
6 silly lifecycle mern-auth#1.0.0~preclient: no script for preclient, continuing
7 info lifecycle mern-auth#1.0.0~client: mern-auth#1.0.0
8 verbose lifecycle mern-auth#1.0.0~client: unsafe-perm in lifecycle true
9 verbose lifecycle mern-auth#1.0.0~client: PATH: /usr/share/npm/bin/node-gyp-bin:/var/www/mern-plaid/node_modules/.bin:/usr/share/npm/bin/node-gyp-bin:/var/www/mern-plaid/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
10 verbose lifecycle mern-auth#1.0.0~client: CWD: /var/www/mern-plaid
11 silly lifecycle mern-auth#1.0.0~client: Args: [ '-c', 'npm start --prefix client' ]
12 silly lifecycle mern-auth#1.0.0~client: Returned: code: 1 signal: null
13 info lifecycle mern-auth#1.0.0~client: Failed to exec client script
14 verbose stack Error: mern-auth#1.0.0 client: `npm start --prefix client`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/share/npm/lib/utils/lifecycle.js:232:16)
14 verbose stack at emitTwo (events.js:126:13)
14 verbose stack at EventEmitter.emit (events.js:214:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/share/npm/lib/utils/spawn.js:24:14)
14 verbose stack at emitTwo (events.js:126:13)
14 verbose stack at ChildProcess.emit (events.js:214:7)
14 verbose stack at maybeClose (internal/child_process.js:925:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
15 verbose pkgid mern-auth#1.0.0
16 verbose cwd /var/www/mern-plaid
17 error Linux 5.0.0-25-generic
18 error argv "/usr/bin/node" "/usr/bin/npm" "run" "client"
19 error node v8.10.0
20 error npm v3.5.2
21 error code ELIFECYCLE
22 error mern-auth#1.0.0 client: `npm start --prefix client`
22 error Exit status 1
23 error Failed at the mern-auth#1.0.0 client script 'npm start --prefix client'.
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 mern-auth package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error npm start --prefix client
23 error You can get information on how to open an issue for this project with:
23 error npm bugs mern-auth
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls mern-auth
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
I was working on Angular2 3-4 weeks ago and kept the project as is, on cloud. The problem is now the project won't run, throws this error at start.
I think the issue is with lite-server, but I did update node modules and npm. Is this the issue with my code or the npm?
0 info it worked if it ends with ok
1 verbose cli [ '/home/ubuntu/.nvm/versions/node/v4.6.1/bin/node',
1 verbose cli '/home/ubuntu/.nvm/versions/node/v4.6.1/bin/npm',
1 verbose cli 'start' ]
2 info using npm#4.3.0
3 info using node#v4.6.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle angular2_try#0.0.1~prestart: angular2_try#0.0.1
6 silly lifecycle angular2_try#0.0.1~prestart: no script for prestart, continuing
7 info lifecycle angular2_try#0.0.1~start: angular2_try#0.0.1
8 verbose lifecycle angular2_try#0.0.1~start: unsafe-perm in lifecycle true
9 verbose lifecycle angular2_try#0.0.1~start: PATH: /home/ubuntu/.nvm/versions/node/v4.6.1/lib/node_modules/npm/bin/node-gyp-bin:/home/ubuntu/workspace/node_modules/.bin:/home/ubuntu/.nvm/versions/node/v4.6.1/bin:/usr/local/rvm/gems/ruby-2.3.0/bin:/usr/local/rvm/gems/ruby-2.3.0#global/bin:/usr/local/rvm/rubies/ruby-2.3.0/bin:/mnt/shared/bin:/home/ubuntu/workspace/node_modules/.bin:/home/ubuntu/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/mnt/shared/sbin:/opt/gitl:/opt/go/bin:/mnt/shared/c9/app.nw/bin:/usr/local/rvm/bin
10 verbose lifecycle angular2_try#0.0.1~start: CWD: /home/ubuntu/workspace
11 silly lifecycle angular2_try#0.0.1~start: Args: [ '-c', 'npm run lite' ]
12 silly lifecycle angular2_try#0.0.1~start: Returned: code: 1 signal: null
13 info lifecycle angular2_try#0.0.1~start: Failed to exec start script
14 verbose stack Error: angular2_try#0.0.1 start: `npm run lite`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/home/ubuntu/.nvm/versions/node/v4.6.1/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at EventEmitter.emit (events.js:172:7)
14 verbose stack at ChildProcess.<anonymous> (/home/ubuntu/.nvm/versions/node/v4.6.1/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at ChildProcess.emit (events.js:172:7)
14 verbose stack at maybeClose (internal/child_process.js:829:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid angular2_try#0.0.1
16 verbose cwd /home/ubuntu/workspace
17 error Linux 4.8.8-c9
18 error argv "/home/ubuntu/.nvm/versions/node/v4.6.1/bin/node" "/home/ubuntu/.nvm/versions/node/v4.6.1/bin/npm" "start"
19 error node v4.6.1
20 error npm v4.3.0
21 error code ELIFECYCLE
22 error errno 1
23 error angular2_try#0.0.1 start: `npm run lite`
23 error Exit status 1
24 error Failed at the angular2_try#0.0.1 start script 'npm run lite'.
24 error Make sure you have the latest version of node.js and npm installed.
24 error If you do, this is most likely a problem with the angular2_try package,
24 error not with npm itself.
24 error Tell the author that this fails on your system:
24 error npm run lite
24 error You can get information on how to open an issue for this project with:
24 error npm bugs angular2_try
24 error Or if that isn't available, you can get their info via:
24 error npm owner ls angular2_try
24 error There is likely additional logging output above.
25 verbose exit [ 1, true ]
The issue was with port of lite-server settings.
Few weeks back, I was running the app on default lite-server port, 3000. But I changed that to http port, 80. and I forgot that.
Now all I had to do was sudo npm start
I'm desperately trying to install node.js (6.10.0, 7.5.0, 7.6.0, 7.7.1) from source onto my server.
First, I get several warnings about compares between signed & unsigned ints (mainly in the deps/icu- and deps/v8-folder). However, make ends successfully. I'm using gcc 6.2.
"make test" ends successfully, too - except one single test addressing "sequential/test-debug-host-port".
"make test-npm" has most problems. If I run it under root I get 39 tests failing. However, running under a normal user there's only one test failing:
0 info it worked if it ends with ok
1 verbose cli [ '/xxxxx/node-v7.7.1/out/Release/node',
1 verbose cli '/xxxxx/node-v7.7.1/test-npm/cli.js',
1 verbose cli 'run-script',
1 verbose cli 'test-node' ]
2 info using npm#4.1.2
3 info using node#v7.7.1
4 verbose run-script [ 'pretest-node', 'test-node', 'posttest-node' ]
5 info lifecycle npm#4.1.2~pretest-node: npm#4.1.2
6 silly lifecycle npm#4.1.2~pretest-node: no script for pretest-node, continuing
7 info lifecycle npm#4.1.2~test-node: npm#4.1.2
8 verbose lifecycle npm#4.1.2~test-node: unsafe-perm in lifecycle true
9 verbose lifecycle npm#4.1.2~test-node: PATH: /xxxxx/node-v7.7.1/test-npm/bin/node-gyp-bin:/xxxxx/node-v7.7.1/test-npm/node$
10 verbose lifecycle npm#4.1.2~test-node: CWD: /xxxxx/node-v7.7.1/test-npm
11 silly lifecycle npm#4.1.2~test-node: Args: [ '-c',
11 silly lifecycle 'tap --timeout 240 "test/tap/*.js" "test/network/*.js" "test/broken-under-nyc*/*.js"' ]
12 silly lifecycle npm#4.1.2~test-node: Returned: code: 1 signal: null
13 info lifecycle npm#4.1.2~test-node: Failed to exec test-node script
14 verbose stack Error: npm#4.1.2 test-node: `tap --timeout 240 "test/tap/*.js" "test/network/*.js" "test/broken-under-nyc*/*.js$
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/xxxxx/node-v7.7.1/test-npm/lib/utils/lifecycle.js:279:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:194:7)
14 verbose stack at ChildProcess.<anonymous> (/xxxxx/node-v7.7.1/test-npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:194:7)
14 verbose stack at maybeClose (internal/child_process.js:899:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid npm#4.1.2
16 verbose cwd /xxxxx/node-v7.7.1/test-npm
17 error Linux 2.6.27.56-0.1-default
18 error argv "/xxxxx/node-v7.7.1/out/Release/node" "/xxxxx/node-v7.7.1/test-npm/cli.js" "run-script" "test-node"
19 error node v7.7.1
20 error npm v4.1.2
21 error code ELIFECYCLE
22 error npm#4.1.2 test-node: `tap --timeout 240 "test/tap/*.js" "test/network/*.js" "test/broken-under-nyc*/*.js"`
22 error Exit status 1
23 error Failed at the npm#4.1.2 test-node script 'tap --timeout 240 "test/tap/*.js" "test/network/*.js" "test/broken-under-nyc*$
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 npm package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error tap --timeout 240 "test/tap/*.js" "test/network/*.js" "test/broken-under-nyc*/*.js"
23 error You can get information on how to open an issue for this project with:
23 error npm bugs npm
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls npm
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
I googled around and all I found was an info about non-resolvable localhost. However, localhost and 127.0.0.1 just work fine with other software on my system...
I just generated a server with express-generator. When I start the server and give it is first request, I get this error.
0 info it worked if it ends with ok
1 verbose cli [ '/Users/user/.nvm/versions/node/v4.2.4/bin/node',
1 verbose cli '/Users/user/.nvm/versions/node/v4.2.4/bin/npm',
1 verbose cli 'start' ]
2 info using npm#3.5.2
3 info using node#v4.2.4
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle sevn#0.0.0~prestart: sevn#0.0.0
6 silly lifecycle sevn#0.0.0~prestart: no script for prestart, continuing
7 info lifecycle sevn#0.0.0~start: sevn#0.0.0
8 verbose lifecycle sevn#0.0.0~start: unsafe-perm in lifecycle true
9 verbose lifecycle sevn#0.0.0~start: PATH: /Users/user/.nvm/versions/node/v4.2.4/lib/node_modules/npm/bin/node-gyp-bin:/Users/user/Projects/sevn/node_modules/.bin:/Users/user/.nvm/versions/node/v4.2.4/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
10 verbose lifecycle sevn#0.0.0~start: CWD: /Users/user/Projects/sevn
11 silly lifecycle sevn#0.0.0~start: Args: [ '-c', 'node ./bin/www' ]
12 silly lifecycle sevn#0.0.0~start: Returned: code: 1 signal: null
13 info lifecycle sevn#0.0.0~start: Failed to exec start script
14 verbose stack Error: sevn#0.0.0 start: `node ./bin/www`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/Users/user/.nvm/versions/node/v4.2.4/lib/node_modules/npm/lib/utils/lifecycle.js:232:16)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at EventEmitter.emit (events.js:172:7)
14 verbose stack at ChildProcess.<anonymous> (/Users/user/.nvm/versions/node/v4.2.4/lib/node_modules/npm/lib/utils/spawn.js:24:14)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at ChildProcess.emit (events.js:172:7)
14 verbose stack at maybeClose (internal/child_process.js:818:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid sevn#0.0.0
16 verbose cwd /Users/user/Projects/sevn
17 error Darwin 15.2.0
18 error argv "/Users/user/.nvm/versions/node/v4.2.4/bin/node" "/Users/user/.nvm/versions/node/v4.2.4/bin/npm" "start"
19 error node v4.2.4
20 error npm v3.5.2
21 error code ELIFECYCLE
22 error sevn#0.0.0 start: `node ./bin/www`
22 error Exit status 1
23 error Failed at the sevn#0.0.0 start script 'node ./bin/www'.
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 sevn package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error node ./bin/www
23 error You can get information on how to open an issue for this project with:
23 error npm bugs sevn
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls sevn
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
What is wrong? Where can I start debugging?
Btw, I have Node.js version v4.2.4 and npm v.3.5.2
Thanks!
Edit: I get an 304 status, shouldn't I get an 200?
The problem was that I hadn't installed compass which I used for express server.
Problem solved with:
gem install compass
I'm just starting here so sorry in advance if this seems obvious,
I've been getting myself accustomed with the appengine back-end and am following Google's bookshelf example as a start.
Everything was going okay until I run the NPM run-script init-cloudsql command and for some reason after I enter the host IP of my db the cmd skips the user prompt and asks me for the password. Then it tried to launch the script with an anonymous user.
I'm following the instructions as described, I get no errors in the previous steps.
Below is the log of my run-script:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\barda\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run-script',
1 verbose cli 'init-cloudsql' ]
2 info using npm#3.5.0
3 info using node#v4.2.2
4 verbose run-script [ 'preinit-cloudsql', 'init-cloudsql', 'postinit-cloudsql' ]
5 info lifecycle nodejs-getting-started#1.0.0~preinit-cloudsql: nodejs-getting-started#1.0.0
6 silly lifecycle nodejs-getting-started#1.0.0~preinit-cloudsql: no script for preinit-cloudsql, continuing
7 info lifecycle nodejs-getting-started#1.0.0~init-cloudsql: nodejs-getting-started#1.0.0
8 verbose lifecycle nodejs-getting-started#1.0.0~init-cloudsql: unsafe-perm in lifecycle true
9 verbose lifecycle nodejs-getting-started#1.0.0~init-cloudsql: PATH: C:\Users\barda\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;C:\nodejs-getting-started-2-structured-data\node_modules\.bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Skype\Phone\;C:\apache-maven-3.3.9\bin\;C:\Users\barda\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin;C:\Users\barda\AppData\Roaming\npm;C:\Program Files\nodejs\
10 verbose lifecycle nodejs-getting-started#1.0.0~init-cloudsql: CWD: C:\nodejs-getting-started-2-structured-data
11 silly lifecycle nodejs-getting-started#1.0.0~init-cloudsql: Args: [ '/d /s /c', 'node books/model-cloudsql.js' ]
12 silly lifecycle nodejs-getting-started#1.0.0~init-cloudsql: Returned: code: 1 signal: null
13 info lifecycle nodejs-getting-started#1.0.0~init-cloudsql: Failed to exec init-cloudsql script
14 verbose stack Error: nodejs-getting-started#1.0.0 init-cloudsql: `node books/model-cloudsql.js`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (C:\Users\barda\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:232:16)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at EventEmitter.emit (events.js:172:7)
14 verbose stack at ChildProcess.<anonymous> (C:\Users\barda\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:24:14)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at ChildProcess.emit (events.js:172:7)
14 verbose stack at maybeClose (internal/child_process.js:818:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid nodejs-getting-started#1.0.0
16 verbose cwd C:\nodejs-getting-started-2-structured-data
17 error Windows_NT 10.0.10586
18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\barda\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run-script" "init-cloudsql"
19 error node v4.2.2
20 error npm v3.5.0
21 error code ELIFECYCLE
22 error nodejs-getting-started#1.0.0 init-cloudsql: `node books/model-cloudsql.js`
22 error Exit status 1
23 error Failed at the nodejs-getting-started#1.0.0 init-cloudsql script 'node books/model-cloudsql.js'.
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 nodejs-getting-started package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error node books/model-cloudsql.js
23 error You can get their info via:
23 error npm owner ls nodejs-getting-started
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]