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

支持更高版本的node.js #14

Open
XCwosjw opened this issue Oct 4, 2022 · 0 comments
Open

支持更高版本的node.js #14

XCwosjw opened this issue Oct 4, 2022 · 0 comments

Comments

@XCwosjw
Copy link

XCwosjw commented Oct 4, 2022

在node.js的 16.17.1 LTS 版本和 18.10.0 Current 版本中使用共享接入均会报错

node:internal/per_context/domexception:53
    ErrorCaptureStackTrace(this);
    ^
DOMException [SyntaxError]: Usages cannot be empty when creating a key.
    at new DOMException (node:internal/per_context/domexception:53:5)
    at __node_internal_ (node:internal/util:509:10)
    at SubtleCrypto.generateKey (node:internal/crypto/webcrypto:148:11)
    at async genKey (C:\Users\XCwosjw\AppData\Roaming\npm\node_modules\freecdn\lib\cmd-key.js:43:18)
    at async init (C:\Users\XCwosjw\AppData\Roaming\npm\node_modules\freecdn\lib\cmd-key.js:18:9)
    at async getPublicKey (C:\Users\XCwosjw\AppData\Roaming\npm\node_modules\freecdn\lib\cmd-key.js:91:9)
    at async getPublicKeyB64 (C:\Users\XCwosjw\AppData\Roaming\npm\node_modules\freecdn\lib\cmd-js.js:16:20)
    at async setupSwOption (C:\Users\XCwosjw\AppData\Roaming\npm\node_modules\freecdn\lib\cmd-js.js:79:23)
    at async Command.run (C:\Users\XCwosjw\AppData\Roaming\npm\node_modules\freecdn\lib\cmd-js.js:110:9)

但在node.js 16.10.0 版本不会出现此问题

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

1 participant