小程序中引用tencentcloud-sdk-nodejs-tts提示缺失crypto?
通过npm install tencentcloud-sdk-nodejs-tts --save 并构建npm 在小程序中引用: const tencentcloud = require("tencentcloud-sdk-nodejs-tts") 编辑报错: 【pages/index/index]错误: Error: module 'miniprogram_npm/tencentcloud-sdk-nodejs-common/crypto.js' is not defined, require args is 'crypto' at C (wxmodule.patch.js?t=wechat&s=1695219134014&v=2.19.4:1) at n (wxmodule.patch.js?t=wechat&s=1695219134014&v=2.19.4:1) at __REQUIRE__ (index.js:27) at abstract_client.js:233 at Object.func (abstract_client.js:233) at __REQUIRE__ (index.js:47) at abstract_client.js:233 at Object.func (sign.js:2) at __REQUIRE__ (index.js:47) at sdk_version.js:1(env: macOS,mp,1.06.2307260; lib: 2.19.4) (anonymous) @ VM1823:1114 doWhenAllScriptLoaded @ VM1770:1160 (anonymous) @ VM1770:15 loadBabelModules @ assubloader.js:1 async function (async) loadBabelModules @ assubloader.js:1 window.loadBabelMod @ VM1753:9 (anonymous) @ possibleConstructorReturn.js:2 WAServiceMainContext.js:2 Uncaught FrameworkError module 'miniprogram_npm/tencentcloud-sdk-nodejs-common/crypto.js' is not defined, require args is 'crypto' Error: module 'miniprogram_npm/tencentcloud-sdk-nodejs-common/crypto.js' is not defined, require args is 'crypto' at C (http://127.0.0.1:48731/appservice/__dev__/wxmodule.patch.js?t=wechat&s=1695219134014&v=2.19.4:1:5584) at n (http://127.0.0.1:48731/appservice/__dev__/wxmodule.patch.js?t=wechat&s=1695219134014&v=2.19.4:1:4741) at __REQUIRE__ (http://127.0.0.1:48731/appservice/miniprogram_npm/tencentcloud-sdk-nodejs-common/index.js:27:34) at http://127.0.0.1:48731/appservice/miniprogram_npm/tencentcloud-sdk-nodejs-common/index.js:620:12 at Object.func (http://127.0.0.1:48731/appservice/miniprogram_npm/tencentcloud-sdk-nodejs-common/index.js:505:18) at __REQUIRE__ (http://127.0.0.1:48731/appservice/miniprogram_npm/tencentcloud-sdk-nodejs-common/index.js:47:23) at http://127.0.0.1:48731/appservice/miniprogram_npm/tencentcloud-sdk-nodejs-common/index.js:475:12 at Object.func (http://127.0.0.1:48731/appservice/miniprogram_npm/tencentcloud-sdk-nodejs-common/index.js:89:18) at __REQUIRE__ (http://127.0.0.1:48731/appservice/miniprogram_npm/tencentcloud-sdk-nodejs-common/index.js:47:23) at http://127.0.0.1:48731/appservice/miniprogram_npm/tencentcloud-sdk-nodejs-common/index.js:80:12(env: macOS,mp,1.06.2307260; lib: 2.19.4) o @ WAServiceMainContext.js:2 c @ VM9 asdebug.js:1 r @ VM9 asdebug.js:1 window.onerror @ VM1753:9 doWhenAllScriptLoaded @ VM1770:1160 (anonymous) @ VM1770:15 loadBabelModules @ assubloader.js:1 error (async) t.default @ VM1753:9 (anonymous) @ VM1753:9 (anonymous) @ VM1753:9 (anonymous) @ VM1753:9 WAServiceMainContext.js:2 Error: module 'miniprogram_npm/tencentcloud-sdk-nodejs-common/crypto.js' is not defined, require args is 'crypto' at C (wxmodule.patch.js?t=wechat&s=1695219134014&v=2.19.4:1) at n (wxmodule.patch.js?t=wechat&s=1695219134014&v=2.19.4:1) at __REQUIRE__ (index.js:27) at abstract_client.js:233 at Object.func (abstract_client.js:233) at __REQUIRE__ (index.js:47) at abstract_client.js:233 at Object.func (sign.js:2) at __REQUIRE__ (index.js:47) at sdk_version.js:1(env: macOS,mp,1.06.2307260; lib: 2.19.4) 小程序中如何正确引用tencentcloud-sdk-nodejs