serverless / platform-sdk

Serverless Platform SDK
Apache License 2.0
17 stars 7 forks source link

No matching version found for @serverless/platform-sdk@^0.2.0 #9

Open jussikinnula opened 6 years ago

jussikinnula commented 6 years ago

The npm package serverless version 1.29.2 has a dependency for @serverless/platform-sdk version ^0.2.0, which does not exist.

$ npm view @serverless/platform-sdk
@serverless/platform-sdk@0.1.5 | Apache-2.0 | deps: 14 | versions: 12
Serverless Platform SDK
https://github.com/serverless/platform-sdk#readme

Also, when trying to install the package manually with specific version the installation fails:

$ npm install --save @serverless/platform-sdk@^0.2.0
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @serverless/platform-sdk@^0.2.0
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

In https://www.npmjs.com/package/@serverless/platform-sdk it states that latest version should be 0.2.0. I'm just guessing that the publishing for 0.2.0 failed.

alexdebrie commented 6 years ago

Hey @jussikinnula, thanks for reporting. I'm able to install the 0.2.0 version of the @serverless/platform-sdk package, so I don't think it was a publishing issue to NPM.

I have seen trouble with scoped packages before, and I wonder if that's happening here. Could you answer a few questions for me:

  1. What version of Node are you using?
  2. What version of NPM are you using?
  3. Are you behind some kind of proxy?
  4. Do you use the public NPM registry (https://registry.npms.org) or are you running your own?

Also cc @miki79 as it seems like you're having the same issue. Can you answer the questions above ^^?

Thanks!

miki79 commented 6 years ago

npm 6.2.0 node v8.11.3 no proxy using the public NPM registry

This is the debug log

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node@8/8.11.3_1/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'i',
1 verbose cli   '@serverless/platform-sdk' ]
2 info using npm@6.2.0
3 info using node@v8.11.3
4 verbose npm-session c08de9df047c5300
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 404 https://registry.npmjs.org/@serverless%2fplatform-sdk 2455ms

but if I call wget "https://registry.npmjs.org/@serverless%2fplatform-sdk" it works, so I guess it's some problem with my npm

alexdebrie commented 6 years ago

@miki79 Looks like it might be related to this issue: https://github.com/npm/npm/issues/17966

Do you have an _auth key in your .npmrc file? If so, could you try commenting it out and then installing?

miki79 commented 6 years ago

@alexdebrie yes, that was the problem. Thank you very much for your help

alexdebrie commented 6 years ago

You're welcome!

cc @jussikinnula to see if this will help you too

sinkang commented 6 years ago

after commneting out.. i'm getting unauthorized error instead

alexdebrie commented 6 years ago

Sorry to hear that, @sinkang. Can you paste the following information:

  1. The stacktrace you get with the error.

  2. The node version you're using -- node --version

  3. The npm version you're using -- npm --version

Thanks!

sinkang commented 6 years ago

hi @alexdebrie , It was my bad... I was using private registry... after I've changed to NPM public registry. it is working fine. Thanks.