我正在尝试安装microsoft- cognitivesservices -speech-sdk
npm install microsoft-cognitiveservices-speech-sdk
但是我一直遇到这个错误Timeout trying to fetch resolutions from npm
我在stackoverflow上找到的解决方案都指向在我的包中添加预安装行。如果microsoft- cogntiveservbices -speech-sdk在其包中没有相同的行,则该"preinstall": "npx npm-force-resolutions@0.0.3"
将正常工作。它试图在未声明版本的情况下在其预安装中安装npm-force- resolve。所以我猜有一个。npmrc配置值我可以设置,所以我不会遇到超时错误(超时=60000没有工作)?
> microsoft-cognitiveservices-speech-sdk@1.21.0-alpha.0.1 preinstall
> npm install --package-lock-only --ignore-scripts --no-audit && npx npm-force-resolutions
up to date in 2s
98 packages are looking for funding
run `npm fund` for details
/home/woodsy/.npm/_npx/73b02210abc194ff/node_modules/npm-force-resolutions/out/npm_force_resolutions/core.cljs:61
(go
^
Error: Timeout trying to fetch resolutions from npm
at switch__2144__auto__ (/home/woodsy/.npm/_npx/73b02210abc194ff/node_modules/npm-force-resolutions/out/npm_force_resolutions/core.cljs:61:3)
at /home/woodsy/.npm/_npx/73b02210abc194ff/node_modules/npm-force-resolutions/out/npm_force_resolutions/core.cljs:61:3
at npm_force_resolutions$core$find_resolutions_$_state_machine__2145__auto____1 (/home/woodsy/.npm/_npx/73b02210abc194ff/node_modules/npm-force-resolutions/out/npm_force_resolutions/core.js:476:4)
at cljs.core.async.impl.ioc-helpers/FN-IDX (/home/woodsy/.npm/_npx/73b02210abc194ff/node_modules/npm-force-resolutions/out/npm_force_resolutions/core.js:492:85)
at cljs.core.async.impl.ioc-helpers/run-state-machine (/home/woodsy/.npm/_npx/73b02210abc194ff/node_modules/npm-force-resolutions/out/cljs/core/async/impl/ioc_helpers.cljs:35:23)
at cljs.core.async.impl.ioc-helpers/run-state-machine-wrapped (/home/woodsy/.npm/_npx/73b02210abc194ff/node_modules/npm-force-resolutions/out/cljs/core/async/impl/ioc_helpers.cljs:39:6)
at fret (/home/woodsy/.npm/_npx/73b02210abc194ff/node_modules/npm-force-resolutions/out/cljs/core/async.cljs:490:22)
at take-cb (/home/woodsy/.npm/_npx/73b02210abc194ff/node_modules/npm-force-resolutions/out/cljs/core/async.cljs:188:63)
at /home/woodsy/.npm/_npx/73b02210abc194ff/node_modules/npm-force-resolutions/out/cljs/core/async/impl/channels.cljs:160:45
at Immediate.cljs$core$async$impl$dispatch$process_messages (/home/woodsy/.npm/_npx/73b02210abc194ff/node_modules/npm-force-resolutions/out/cljs/core/async/impl/dispatch.cljs:18:7)
npm ERR! code 1
npm ERR! path /home/woodsy/cognitive-services-speech-sdk-js
npm ERR! command failed
npm ERR! command sh -c npm install --package-lock-only --ignore-scripts --no-audit && npx npm-force-resolutions
我可以在默认的node@16.15.1 docker容器上安装语音sdk。我遇到的唯一麻烦是弄清楚早期版本的节点docker包含要求您提供——workdir参数,否则NPM将在每次安装时失败,并使用通用的"理想树"。错误。
你能使用下列内容吗?如果不是,会得到什么错误?
C:Usersbrianem>docker run -it——rm——workdir/temp节点:16.15.1 bash
root@1a4900f41d89:/temp# npm install microsoft- cognitivesservices -speech-sdk
新增44个包,47s审核45个包
9个包正在寻找资金执行命令npm fund
查看详细信息
发现0个漏洞npm通知npm新主版本可用!8.11.0→9.2.0npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.2.0运行npm install -g npm@9.2.0更新!npm注意
root@1a4900f41d89:/temp# head node_modules/microsoft- cognitivesservices -speech-sdk/package.json{"name"microsoft-cognitiveservices-speech-sdk"作者";微软公司&;"homepage"https://docs.microsoft.com/azure/cognitive-services/speech-service/">"version"1.24.1","license"MIT"Microsoft Cognitive Services Speech SDK for javascript;"keywords"("microsoft","cognitiveservices",root@1a4900f41d89:/temp #