From d8b19a73e53db939de3fcd8b77ce539c9ee8a61f Mon Sep 17 00:00:00 2001 From: Richard Macklin Date: Tue, 14 Mar 2023 16:50:20 -0700 Subject: [PATCH] Remove fibers dependency It seems that the usage of this dependency was removed in b7d2708110efc2177e1ae2fd0312109194d92714, 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: https://github.com/laverdet/node-fibers/commit/8f2809869cc92c28c92880c4a38317ae3dbe654d 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 ``` --- package.json | 1 - yarn.lock | 12 ------------ 2 files changed, 13 deletions(-) diff --git a/package.json b/package.json index 27de0991..505657fc 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,6 @@ "eslint-config-prettier": "^6.11.0", "eslint-plugin-prettier": "^3.1.4", "eslint-plugin-vue": "^6.2.2", - "fibers": "^5.0.0", "fork-ts-checker-webpack-plugin": "^5.0.7", "hotkeys-js": "^3.8.1", "husky": "^4.2.5", diff --git a/yarn.lock b/yarn.lock index 1d720331..8143ddf2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3797,11 +3797,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" @@ -4672,13 +4667,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"