Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm run development aborts #1643

Closed
Msrgit opened this issue Nov 29, 2018 · 6 comments
Closed

npm run development aborts #1643

Msrgit opened this issue Nov 29, 2018 · 6 comments

Comments

@Msrgit
Copy link

Msrgit commented Nov 29, 2018

  • v11.3.0
  • Linux e48.ehosts.com 3.10.0-693.11.6.1.ELK.el6.x86_64 Update README for help #1 SMP Tue Jan 23 10:30:30 MST 2018 x86_64 x86_64 x86_64 GNU/Linux
  • node_platform.cc

Developing Laravel app.
package.json:
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"axios": "^0.16.2",
"bootstrap-sass": "^3.3.7",
"cross-env": "^5.0.1",
"jquery": "^3.1.1",
"laravel-mix": "^1.0",
"lodash": "^4.17.4",
"vue": "^2.1.10"
},
"dependencies": {
"ajv": "^6.5.0"
}
}

npm run development produced:

npm run development

@ development /home2/rpiserve/public_html/piscreen/rpiclone
cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

node[1610]: ../src/node_platform.cc:63:std::unique_ptr node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
1: 0x944930 node::Abort() [node]
2: 0x9449c5 [node]
3: 0x99975a node::WorkerThreadsTaskRunner::WorkerThreadsTaskRunner(int) [node]
4: 0x99981b node::NodePlatform::NodePlatform(int, node::tracing::TracingController*) [node]
5: 0x9172b6 node::Start(int, char**) [node]
6: 0x7fc74a119d20 __libc_start_main [/lib64/libc.so.6]
7: 0x8ce035 [node]
Aborted

@Trott Trott transferred this issue from nodejs/node Nov 29, 2018
@gireeshpunathil
Copy link
Member

on the face of it, it indicates that uv_thread_create failure, which, under normal circumstances indicates resource (ulimit) constraints.

Figuring out your resource settings (ulimit a) and the consumption of the process at the time of failure would be the a path to problem determination IMO.

/cc however copying @addaleax for an expert guidance.

@Msrgit
Copy link
Author

Msrgit commented Nov 30, 2018

Re-ran npm run development and now get:

@ development /home2/rpiserve/public_html/piscreen/rpiclone
cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/las

events.js:167
throw er; // Unhandled 'error' event
^

Error: spawn node_modules/webpack/bin/webpack.js EACCES
at Process.ChildProcess._handle.onexit (internal/child_process.js:246:19)
at onErrorNT (internal/child_process.js:421:16)
at internalTickCallback (internal/process/next_tick.js:72:19)
at process._tickCallback (internal/process/next_tick.js:47:5)
at Function.Module.runMain (internal/modules/cjs/loader.js:778:11)
at startup (internal/bootstrap/node.js:300:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:826:3)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:252:12)
at onErrorNT (internal/child_process.js:421:16)
[... lines matching original stack trace ...]
at bootstrapNodeJSCore (internal/bootstrap/node.js:826:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ development: cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules -
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ development script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home2/rpiserve/.npm/_logs/2018-11-30T12_14_47_570Z-debug.log

debug.log shows:

cat ~/.npm/logs/2018-11-30T12_14_47_570Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/home2/rpiserve/.nvm/versions/node/v11.3.0/bin/node',
1 verbose cli '/home2/rpiserve/.nvm/versions/node/v11.3.0/bin/npm',
1 verbose cli 'run',
1 verbose cli 'development' ]
2 info using npm@6.4.1
3 info using node@v11.3.0
4 verbose run-script [ 'predevelopment', 'development', 'postdevelopment' ]
5 info lifecycle @~predevelopment: @
6 info lifecycle @~development: @
7 verbose lifecycle @~development: unsafe-perm in lifecycle true
8 verbose lifecycle @~development: PATH: /home2/rpiserve/.nvm/versions/node/v11.3.0/lib/node_modules/npm/node_modules/nn
9 verbose lifecycle @~development: CWD: /home2/rpiserve/public_html/piscreen/rpiclone
10 silly lifecycle @~development: Args: [ '-c',
10 silly lifecycle 'cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --co]
11 silly lifecycle @~development: Returned: code: 1 signal: null
12 info lifecycle @~development: Failed to exec development script
13 verbose stack Error: @ development: cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress -
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (/home2/rpiserve/.nvm/versions/node/v11.3.0/lib/node_modules/npm/node
)
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess. (/home2/rpiserve/.nvm/versions/node/v11.3.0/lib/node_modules/npm/node_)
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:978:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
14 verbose pkgid @
15 verbose cwd /home2/rpiserve/public_html/piscreen/rpiclone
16 verbose Linux 3.10.0-693.11.6.1.ELK.el6.x86_64
17 verbose argv "/home2/rpiserve/.nvm/versions/node/v11.3.0/bin/node" "/home2/rpiserve/.nvm/versions/node/v11.3.0/bin/n"
18 verbose node v11.3.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error @ development: cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules -
22 error Exit status 1
23 error Failed at the @ development script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

@Msrgit
Copy link
Author

Msrgit commented Dec 3, 2018

Fixed previous issue. Pathname on cross-env command line missing /dist before /bin.

Original issue though still occurs.

ulimit -a gives:

core file size (blocks, -c) 0
data seg size (kbytes, -d) 800000
scheduling priority (-e) 0
file size (blocks, -f) 349
pending signals (-i) 256520
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) 800000
open files (-n) 100
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 15240
cpu time (seconds, -t) unlimited
max user processes (-u) 25
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

Which limit might need increasing (using a hosted service)

@gireeshpunathil
Copy link
Member

could you pls try running with increased user process count?
say ulimit -u 1024

@Msrgit
Copy link
Author

Msrgit commented Dec 3, 2018

Sadly no. I've asked and as I am using a shared service they won't increase the process count. Is there any way of reducing the process burden through a command option? If not please close this issue and I'll look elsewhere for a solution. Thanks for your time.

@gireeshpunathil
Copy link
Member

I fear no; as that will involve looking deep into the commands, and then the individual scripts / modules that get executed and circumventing process spawning logic etc. to contain within the said restrictions; and eventually ending up not meeting the real purpose of running this command. :)

So I will close this out on your statement; looks like there is nothing that can be done from Node's perspective. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants