Search code examples
node.jsnpmbuildnpm-installsnyk

ERROR npm install No valid versions available for https-proxy-agent-snyk-fork


Running the npm install for deploying purpose, I am getting the below error

+ npm install
npm ERR! code ENOVERSIONS
npm ERR! No valid versions available for https-proxy-agent-snyk-fork

The log file contains the below log

http fetch GET 200 http://registry.npmjs.org/https-proxy-agent-snyk-fork 1115ms
8 silly fetchPackageMetaData error for https-proxy-agent-snyk-fork@latest No valid versions available for https-proxy-agent-snyk-fork
9 timing stage:rollbackFailedOptional Completed in 1ms
10 timing stage:runTopLevelLifecycles Completed in 2485ms
11 verbose type tag
12 verbose stack https-proxy-agent-snyk-fork: No valid versions available for https-proxy-agent-snyk-fork

Need some insight, it was working correctly a week ago and I didn't change the package.json as well.


Solution

  • I checked the directory for https-proxy-agent-snyk-fork using

    npm ls https-proxy-agent-snyk-fork
    

    and found

    `-- [email protected]
      `-- [email protected]
        +-- [email protected]  (git://github.com/snyk/node-https-proxy-agent.git#5e86ccb682d0c833c8daa25ee6f91c670161cd66)
        `-- [email protected] (git://github.com/snyk/node-pac-proxy-agent.git#e962ea0fe8db650a55e349e1b422e3ac99bfe451)
          `-- [email protected]  deduped (git://github.com/snyk/node-https-proxy-agent.git#5e86ccb682d0c833c8daa25ee6f91c670161cd66)
    

    I updated the version for the root which is snyk here and I also updated my docker script for deployment from

    npm install
    

    to

    npm install --global copy
    npm install
    

    Which solved the issue for me.