尝试从NPM获取分辨率的超时
我正在尝试安装Microsoft-CognitiveServices-Speech-SDK
npm install microsoft-cognitiveservices-speech-sdk
,但我一直遇到此错误超时尝试从NPM
我在Stackoverflow上找到的解决方案全部指向将预安装行添加到我的我package.json where I specify this "preinstall": "npx [email protected] “
,如果Microsoft-Cognitiveservbices-Speech-SDK在其包装中没有相同的行。声明版本。因此,我想我可以设置一个.npmrc配置值,以便我不会遇到超时错误(超时= 60000不起作用)?
> [email protected] 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
I'm trying to install microsoft-cognitiveservices-speech-sdk
npm install microsoft-cognitiveservices-speech-sdk
but I keep encountering this error Timeout trying to fetch resolutions from npm
The solutions I'm finding on stackoverflow all point to adding a preinstall line to my package.json where I specify this "preinstall": "npx [email protected]"
which would work fine if the microsoft-cognitiveservbices-speech-sdk didn't have the same line in its package.json where its trying to install the npm-force-resoultion in its preinstall without a version declared. So I guess is there an .npmrc config value I can set so I won't experience the timeout error (timeout=60000 didn't work)?
> [email protected] 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我能够在默认的 [emagy  emagle  protected emage 容器。
我唯一的麻烦是弄清楚节点docker包含的早期版本是否需要您提供 - workdir参数,否则NPM将失败,每个安装都会出现通用的“ ifextree”错误。
您可以使用以下内容吗?
如果没有,您会遇到什么错误?
c:\ users \ brianem> docker run -It - rm -rm-workdir/temp节点:16.15.1 bash
root@1a4900f41d89:/temp#npm#npm SDK
添加了44个包裹,47S中的45个包裹审计的45个
包裹正在寻找资金
运行
NPM Fund
有关发现的详细信息0漏洞
NPM通知
NPM注意NPM的新专业版本可用! 8.11.0 - > 9.2.0
npm通知changElog: https://github.com/npm/npm/cli/releases/标签/v9.2.0
NPM通知运行NPM安装-G [email  procation]
npm注意
root@1A4900F41D89:/temp#head node_modules/microsoft-cognitiveservices-spech-sdk/package.json
{
“名称”:“ Microsoft-Cognitiveservices-Speech-SDK”,
“作者”:“ Microsoft Corporation”,
“主页”:“ https://docs.microsoft.com/azure/cognitive-services/speech-service/”,
“版本”:“ 1.24.1”,
“许可证”:“麻省理工学院”,
“描述”:“ Microsoft认知服务语音SDK用于JavaScript”,
“关键字”:[
“微软”,
“ cognitiveservices”,
root@1A4900F41D89:/TEMP#
I am able to install the speech sdk on a default [email protected] docker container.
The only trouble I had was figuring out the earlier version of the node docker contain require you to provide the --workdir parameter, or NPM will fail every install with a generic "IdealTree" error.
Are you able to use the following?
If not, what errors do you get?
C:\Users\brianem>docker run -it --rm --workdir /temp node:16.15.1 bash
root@1a4900f41d89:/temp# npm install microsoft-cognitiveservices-speech-sdk
added 44 packages, and audited 45 packages in 47s
9 packages are looking for funding
run
npm fund
for detailsfound 0 vulnerabilities
npm notice
npm notice New major version of npm available! 8.11.0 -> 9.2.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.2.0
npm notice Run npm install -g [email protected] to update!
npm notice
root@1a4900f41d89:/temp# head node_modules/microsoft-cognitiveservices-speech-sdk/package.json
{
"name": "microsoft-cognitiveservices-speech-sdk",
"author": "Microsoft Corporation",
"homepage": "https://docs.microsoft.com/azure/cognitive-services/speech-service/",
"version": "1.24.1",
"license": "MIT",
"description": "Microsoft Cognitive Services Speech SDK for JavaScript",
"keywords": [
"microsoft",
"cognitiveservices",
root@1a4900f41d89:/temp#