WordPress / phpunit-test-runner

GNU General Public License v2.0
68 stars 64 forks source link

Error running prepare.php #155

Closed raimundas closed 10 months ago

raimundas commented 3 years ago

Hello,

I receive an error while running the prepare.php script. Error log output bellow. I am running a cPanel server with Cloudlinux. I have tried increasing my user resources, various limits, tried different php and nodejs, tried to setup grunt globally, etc. However, nothing helps. The script fails every time on the "WordPress@5.9.0 build: grunt build". Need some help to figure this our.


The command line output:

Running "webpack:prod" (webpack) task node[4140250]: pthread_create: Resource temporarily unavailable /opt/alt/alt-nodejs14/root/usr/bin/node[4140257]: ../src/node_platform.cc:61:std::unique_ptr node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion (0) == (uv_thread_create(t.get(), start_thread, this))' failed. 1: 0x985920 node::Abort() [/opt/alt/alt-nodejs14/root/usr/bin/node] 2: 0x9859b0 node::Assert(node::AssertionInfo const&) [/opt/alt/alt-nodejs14/root/usr/bin/node] 3: 0x9fe006 node::WorkerThreadsTaskRunner::WorkerThreadsTaskRunner(int) [/opt/alt/alt-nodejs14/root/usr/bin/node] 4: 0x9ffc1f node::NodePlatform::NodePlatform(int, v8::TracingController*) [/opt/alt/alt-nodejs14/root/usr/bin/node] 5: 0x94fe96 node::InitializeOncePerProcess(int, char**) [/opt/alt/alt-nodejs14/root/usr/bin/node] 6: 0x950390 node::Start(int, char**) [/opt/alt/alt-nodejs14/root/usr/bin/node] 7: 0x7fc1f75f6555 __libc_start_main [/lib64/libc.so.6] 8: 0x8d9cf5 [/opt/alt/alt-nodejs14/root/usr/bin/node] Fatal error: spawn ENOMEM npm ERR! code ELIFECYCLE npm ERR! errno 3 npm ERR! WordPress@5.9.0 build:grunt build` npm ERR! Exit status 3 npm ERR! npm ERR! Failed at the WordPress@5.9.0 build 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! /var/home/wpbot/.npm/_logs/2021-09-07T09_08_43_314Z-debug.log events.js:352 throw er; // Unhandled 'error' event ^

Error: write EPIPE at process.target._send (internal/child_process.js:839:20) at process.target.send (internal/child_process.js:710:19) at callback (/var/home/wpbot/public_html/wp-test-runner/node_modules/worker-farm/lib/child/index.js:32:17) at module.exports (/var/home/wpbot/public_html/wp-test-runner/node_modules/terser-webpack-plugin/dist/worker.js:13:5) at handle (/var/home/wpbot/public_html/wp-test-runner/node_modules/worker-farm/lib/child/index.js:44:8) at process. (/var/home/wpbot/public_html/wp-test-runner/node_modules/worker-farm/lib/child/index.js:55:3) at process.emit (events.js:375:28) at emit (internal/child_process.js:910:12) at processTicksAndRejections (internal/process/task_queues.js:83:21) Emitted 'error' event on process instance at: at internal/child_process.js:843:39 at processTicksAndRejections (internal/process/task_queues.js:77:11) { errno: -32, code: 'EPIPE', syscall: 'write' } events.js:352 throw er; // Unhandled 'error' event ^

Error: write EPIPE at process.target._send (internal/child_process.js:839:20) at process.target.send (internal/child_process.js:710:19) at callback (/var/home/wpbot/public_html/wp-test-runner/node_modules/worker-farm/lib/child/index.js:32:17) at module.exports (/var/home/wpbot/public_html/wp-test-runner/node_modules/terser-webpack-plugin/dist/worker.js:13:5) at handle (/var/home/wpbot/public_html/wp-test-runner/node_modules/worker-farm/lib/child/index.js:44:8) at process. (/var/home/wpbot/public_html/wp-test-runner/node_modules/worker-farm/lib/child/index.js:55:3) at process.emit (events.js:375:28) at emit (internal/child_process.js:910:12) at processTicksAndRejections (internal/process/task_queues.js:83:21) Emitted 'error' event on process instance at: at internal/child_process.js:843:39 at processTicksAndRejections (internal/process/task_queues.js:77:11) { errno: -32, code: 'EPIPE', syscall: 'write' } Error: Failed to perform operation.


The LOG output:

0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli '/opt/alt/alt-nodejs14/root/usr/bin/node', 1 verbose cli '/opt/alt/alt-nodejs14/root/usr/bin/npm', 1 verbose cli 'run', 1 verbose cli 'build' 1 verbose cli ] 2 info using npm@6.14.13 3 info using node@v14.17.3 4 verbose run-script [ 'prebuild', 'build', 'postbuild' ] 5 info lifecycle WordPress@5.9.0~prebuild: WordPress@5.9.0 6 info lifecycle WordPress@5.9.0~build: WordPress@5.9.0 7 verbose lifecycle WordPress@5.9.0~build: unsafe-perm in lifecycle true 8 verbose lifecycle WordPress@5.9.0~build: PATH: /opt/alt/alt-nodejs14/root/usr/lib/node_modules/npm/node_modules.bundled/npm-lifecycle/node-gyp-bin:/var/home/wpbot/public_html/wp-test-runner/node_modules/.bin:/opt/alt/alt-nodejs14/root/usr/bin:/usr/local/cpanel/3rdparty/lib/path-bin:/usr/local/cpanel/3rdparty/lib/path-bin:/usr/local/cpanel/3rdparty/lib/path-bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/cpanel/composer/bin:/var/home/wpbot/.local/bin:/var/home/wpbot/bin 9 verbose lifecycle WordPress@5.9.0~build: CWD: /var/home/wpbot/public_html/wp-test-runner 10 silly lifecycle WordPress@5.9.0~build: Args: [ '-c', 'grunt build' ] 11 silly lifecycle WordPress@5.9.0~build: Returned: code: 3 signal: null 12 info lifecycle WordPress@5.9.0~build: Failed to exec build script 13 verbose stack Error: WordPress@5.9.0 build: grunt build 13 verbose stack Exit status 3 13 verbose stack at EventEmitter. (/opt/alt/alt-nodejs14/root/usr/lib/node_modules/npm/node_modules.bundled/npm-lifecycle/index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:375:28) 13 verbose stack at ChildProcess. (/opt/alt/alt-nodejs14/root/usr/lib/node_modules/npm/node_modules.bundled/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:375:28) 13 verbose stack at maybeClose (internal/child_process.js:1055:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) 14 verbose pkgid WordPress@5.9.0 15 verbose cwd /var/home/wpbot/public_html/wp-test-runner 16 verbose Linux 3.10.0-962.3.2.lve1.5.49.el7.x86_64 17 verbose argv "/opt/alt/alt-nodejs14/root/usr/bin/node" "/opt/alt/alt-nodejs14/root/usr/bin/npm" "run" "build" 18 verbose node v14.17.3 19 verbose npm v6.14.13 20 error code ELIFECYCLE 21 error errno 3 22 error WordPress@5.9.0 build: grunt build 22 error Exit status 3 23 error Failed at the WordPress@5.9.0 build script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 3, true ]

javiercasares commented 10 months ago

Fixed in the latest release.