worker-loader icon indicating copy to clipboard operation
worker-loader copied to clipboard

support node worker_thread

Open tranvansang opened this issue 3 years ago • 0 comments

This PR contains a:

  • [ ] bugfix
  • [x] new feature
  • [ ] code refactor
  • [ ] test update
  • [ ] typo fix
  • [ ] metadata update

Motivation / Use-Case

Support nodejs's worker_threads out of the box.

Breaking Changes

If options.publicPath is set, use it instead of __webpack_public_path__.

Additional Info

Current, I cannot run npm run lint, while npm run test:only works. Here is the error when running npm run lint

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/opt/node-v15.5.1-linux-x64/bin/node',
1 verbose cli   '/home/transang/.yarn/bin/npm',
1 verbose cli   'run',
1 verbose cli   'lint:prettier'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prelint:prettier', 'lint:prettier', 'postlint:prettier' ]
5 info lifecycle [email protected]~prelint:prettier: [email protected]
6 info lifecycle [email protected]~lint:prettier: [email protected]
7 verbose lifecycle [email protected]~lint:prettier: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~lint:prettier: PATH: /home/transang/.config/yarn/global/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/transang/worker-loader/node_modules/.bin:/home/transang/anaconda3/bin:/home/transang/anaconda3/condabin:/opt/nvim-osx64/bin:/opt/google-cloud-sdk/bin:/opt/flutter/bin:/home/transang/.yarn/bin:/opt/helm:/opt/bin:/home/transang/go/bin:/opt/node/bin:/opt/jetbrains-toolbox:/home/transang/worker-loader/node_modules/.bin:/home/transang/.local/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/opt/cuda/bin:/opt/cuda/nsight_compute:/opt/cuda/nsight_systems/bin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/transang/.fzf/bin
9 verbose lifecycle [email protected]~lint:prettier: CWD: /home/transang/worker-loader
10 silly lifecycle [email protected]~lint:prettier: Args: [ '-c', 'prettier --list-different .' ]
11 silly lifecycle [email protected]~lint:prettier: Returned: code: 1  signal: null
12 info lifecycle [email protected]~lint:prettier: Failed to exec lint:prettier script
13 verbose stack Error: [email protected] lint:prettier: `prettier --list-different .`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/home/transang/.config/yarn/global/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (node:events:376:20)
13 verbose stack     at ChildProcess.<anonymous> (/home/transang/.config/yarn/global/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (node:events:376:20)
13 verbose stack     at maybeClose (node:internal/child_process:1063:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:295:5)
14 verbose pkgid [email protected]
15 verbose cwd /home/transang/worker-loader
16 verbose Linux 5.11.10-arch1-1
17 verbose argv "/opt/node-v15.5.1-linux-x64/bin/node" "/home/transang/.yarn/bin/npm" "run" "lint:prettier"
18 verbose node v15.5.1
19 verbose npm  v6.14.8
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] lint:prettier: `prettier --list-different .`
22 error Exit status 1
23 error Failed at the [email protected] lint:prettier script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

tranvansang avatar Apr 03 '21 22:04 tranvansang