1

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 npm-force-resolutions@0.0.3" 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)?


> 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
Darren Cohen
  • 126
  • 6
Woodsy
  • 3,177
  • 2
  • 26
  • 50
  • I am able to install v1.17.0 but this error happens when I try to install the latest version of the libary v1.22.0. I'm using node v16.15.1 – Woodsy Jun 09 '22 at 20:38

1 Answers1

0

I am able to install the speech sdk on a default node@16.15.1 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 details

found 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 npm@9.2.0 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#