Skip to content

Commit

Permalink
Remove fibers dependency (#750)
Browse files Browse the repository at this point in the history
It seems that the usage of this dependency was removed in
b7d2708, so we don't actually need it.
Furthermore, even though it doesn't appear to be used anywhere else,
just having the package as a dependency breaks `yarn build` on node 16:

```
yarn build
yarn run v1.22.19
$ cross-env NODE_ENV=production webpack --hide-modules
  build [===                 ] 15%Assertion failed: (thread_id_key != 0x7777), function find_thread_id_key, file coroutine.cc, line 134.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^

RpcIpcMessagePortClosedError: Cannot send the message - the message port has been closed for the process 83355.
    at /Users/rmacklin/src/github.com/ankit/stylebot/stylebot/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/rpc-ipc/RpcIpcMessagePort.js:47:47
    at processTicksAndRejections (node:internal/process/task_queues:82:21) {
  code: undefined,
  signal: undefined
}
```
and that `thread_id_key` error is apparently a well-known issue with the
fibers package which doesn't support node 16:
laverdet/node-fibers@8f28098

After removing the dependency, we can successfully run `yarn build` on
node 16 (which is important, because earlier versions of node are not
supported on darwin-arm64, a.k.a. Apple Silicon):
```
yarn build
yarn run v1.22.19
$ cross-env NODE_ENV=production webpack --hide-modules
  build [======              ] 32%Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Build completed in 5.822s
```

Co-authored-by: Ankit Ahuja <[email protected]>
  • Loading branch information
rmacklin and ankit committed May 15, 2024
1 parent 73eb9c6 commit b0bd37f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-vue": "^6.2.2",
"fibers": "^5.0.0",
"hotkeys-js": "^3.8.1",
"husky": "^4.2.5",
"jest": "^26.1.0",
Expand Down
12 changes: 0 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3795,11 +3795,6 @@ detect-file@^1.0.0:
resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7"
integrity sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=

detect-libc@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=

detect-newline@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651"
Expand Down Expand Up @@ -4670,13 +4665,6 @@ fd-slicer@~1.1.0:
dependencies:
pend "~1.2.0"

fibers@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/fibers/-/fibers-5.0.0.tgz#3a60e0695b3ee5f6db94e62726716fa7a59acc41"
integrity sha512-UpGv/YAZp7mhKHxDvC1tColrroGRX90sSvh8RMZV9leo+e5+EkRVgCEZPlmXeo3BUNQTZxUaVdLskq1Q2FyCPg==
dependencies:
detect-libc "^1.0.3"

figgy-pudding@^3.5.1:
version "3.5.2"
resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e"
Expand Down

0 comments on commit b0bd37f

Please sign in to comment.