支持更高版本的node.js
Illustar0 opened this issue · 0 comments
Illustar0 commented
在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 版本不会出现此问题