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

MacOS Big Sur启动zan-proxy报错 #146

Open
Redzli opened this issue Jul 29, 2021 · 3 comments
Open

MacOS Big Sur启动zan-proxy报错 #146

Redzli opened this issue Jul 29, 2021 · 3 comments

Comments

@Redzli
Copy link

Redzli commented Jul 29, 2021

见以下,安装了 zan-proxy,但是无法启动

❯     zan-proxy --version

4.0.27
❯     zan-proxy

(node:49680) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (1627543775468)
    at Object.writeFileSync (fs.js:1517:5)
    at Object.set (/Users/bytedance/.config/yarn/global/node_modules/zan-proxy/dist/bin/selfUpdate.js:46:22)
    at Object.<anonymous> (/Users/bytedance/.config/yarn/global/node_modules/zan-proxy/dist/bin/selfUpdate.js:56:19)
    at Generator.next (<anonymous>)
    at /Users/bytedance/.config/yarn/global/node_modules/zan-proxy/dist/bin/selfUpdate.js:7:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/bytedance/.config/yarn/global/node_modules/zan-proxy/dist/bin/selfUpdate.js:3:12)
    at Object.exports.default (/Users/bytedance/.config/yarn/global/node_modules/zan-proxy/dist/bin/selfUpdate.js:50:25)
    at /Users/bytedance/.config/yarn/global/node_modules/zan-proxy/dist/bin/index.js:35:39
    at Generator.next (<anonymous>)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:49680) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:49680) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@hoboy0313
Copy link

见以下,安装了 zan-proxy,但是无法启动

❯     zan-proxy --version

4.0.27
❯     zan-proxy

(node:49680) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (1627543775468)
    at Object.writeFileSync (fs.js:1517:5)
    at Object.set (/Users/bytedance/.config/yarn/global/node_modules/zan-proxy/dist/bin/selfUpdate.js:46:22)
    at Object.<anonymous> (/Users/bytedance/.config/yarn/global/node_modules/zan-proxy/dist/bin/selfUpdate.js:56:19)
    at Generator.next (<anonymous>)
    at /Users/bytedance/.config/yarn/global/node_modules/zan-proxy/dist/bin/selfUpdate.js:7:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/bytedance/.config/yarn/global/node_modules/zan-proxy/dist/bin/selfUpdate.js:3:12)
    at Object.exports.default (/Users/bytedance/.config/yarn/global/node_modules/zan-proxy/dist/bin/selfUpdate.js:50:25)
    at /Users/bytedance/.config/yarn/global/node_modules/zan-proxy/dist/bin/index.js:35:39
    at Generator.next (<anonymous>)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:49680) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:49680) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

同问,
系统:MacOS 10.15.0
node: v14.15.0
npm: 6.14.8

步骤:

  1. npm i -g zan-proxy
  2. zan-proxy --version => 4.0.27
  3. zan-proxy // 报错等同于上面的同学

@laocaibulao
Copy link

系统:MacOS 11.6
node: v16.10.0
npm: 7.24.0
我也是一样报错,卸载重装Node了,故障还是这样,折腾了一个小时了唉

`node:internal/errors:464
ErrorCaptureStackTrace(err);
^

TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (1633265976271)
at Object.writeFileSync (node:fs:2146:5)
at Object.set (/usr/local/lib/node_modules/zan-proxy/dist/bin/selfUpdate.js:46:22)
at Object. (/usr/local/lib/node_modules/zan-proxy/dist/bin/selfUpdate.js:56:19)
at Generator.next ()
at /usr/local/lib/node_modules/zan-proxy/dist/bin/selfUpdate.js:7:71
at new Promise ()
at __awaiter (/usr/local/lib/node_modules/zan-proxy/dist/bin/selfUpdate.js:3:12)
at Object.exports.default (/usr/local/lib/node_modules/zan-proxy/dist/bin/selfUpdate.js:50:25)
at /usr/local/lib/node_modules/zan-proxy/dist/bin/index.js:35:39
at Generator.next () {
code: 'ERR_INVALID_ARG_TYPE'
}`

@Luncode
Copy link

Luncode commented Dec 3, 2021

启动时 命令使用 zan-proxy --no-update 可以启动成功 参考 #61

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

4 participants