serverless: Dependency Broken (2-thenable) - 404

❗️ NOTE FROM MAINTAINERS ❗️

It’s an issue on npm registry side, where for requests which include the accept: application/vnd.npm.install-v1+json header a 404 response is returned

Following returns 200

curl -i https://registry.npmjs.org/2-thenable

Following 404

curl -i -H "accept: application/vnd.npm.install-v1+json" https://registry.npmjs.org/2-thenable

I was informed that issue is already fixed on npm side. Still it may might take a couple of hours to propagate across all nodes and CDN layer.


Hello there!

I’m getting 404 err when installing serverless with: npm install serverless, check this out:

image

Is someone facing the same problem?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 37
  • Comments: 54 (8 by maintainers)

Most upvoted comments

Hi all - I work at @npm and we’re very sorry about the 404’s you are experiencing.

We have identified the issue on our end and rolled out the fix. Unfortunately, its going take some time to propagate through all our nodes in our CDN layer.

You can follow along for progress via the incident on our status page

Also, you if you have other packages affected then please feel free to contact our support team directly.

ran npm install npm@latest -g and then npm i and it works

I had issues on build containers and locally on macOS.

I found changing the yarn registry worked:

yarn config set registry https://yarn.npmjs.org

Edit: I also use nodejs 10.x because packages like the serverless-image-handler don’t support 12.x yet

Response from npm:

thank you for reporting this, we’ve identified the issue and have rolled out a fix, though this might take a couple of hours to propagate across all our nodes and CDN layer.

I still get this error image

Yarn Version : 1.22 Node Version : 12 This is started from yesterday evening…

Grabbing directly from Github works in CodeBuild:

- npm install --verbose -g git+https://github.com/medikoo/2-thenable.git

Also, updating npm fixed it in CodeBuild standard / nodejs:8 runtime

version: 0.2

phases:
  install:
    runtime-versions:
      nodejs: 8
  build:
    commands:
      - npm install -g npm # Update npm
      - npm install -g 2-thenable

Newer npm versions are working fine. Just updated my projects to npm 6.13.7 and it worked!

Yes, we are having this issue using AWS CodeBuild, however, it works fine on our local network PC’s.

screenshot-us-east-2 console aws amazon com-2020 02 11-16_00_25

Thanks @nomadtechie , Must be a bit of a headache there at @npm for you

Still an issue for us. Nodejs 10.x

Edit: fixed for us!

Please report to AWS support, that there’s some issue with npm registry mirror on their side. Point that 2-thenable@^1.0.0 is available in npm registry:

We are also having the same issue with CodeBuild. Updated NPM version to 6.13.7, but still didn’t seem to fix it for us.

We would appreciate any help!

1 | [Container] 2020/02/11 22:37:38 Waiting for agent ping 2 | [Container] 2020/02/11 22:37:40 Waiting for DOWNLOAD_SOURCE 3 | [Container] 2020/02/11 22:37:40 Phase is DOWNLOAD_SOURCE 4 | [Container] 2020/02/11 22:37:40 CODEBUILD_SRC_DIR=/codebuild/output/src401425153/src 5 | [Container] 2020/02/11 22:37:40 YAML location is /codebuild/output/src401425153/src/buildspec.yml 6 | [Container] 2020/02/11 22:37:40 Processing environment variables 7 | [Container] 2020/02/11 22:37:40 Moving to directory /codebuild/output/src401425153/src 8 | [Container] 2020/02/11 22:37:40 Registering with agent 9 | [Container] 2020/02/11 22:37:40 Phases found in YAML: 4 10 | [Container] 2020/02/11 22:37:40 BUILD: 3 commands 11 | [Container] 2020/02/11 22:37:40 POST_BUILD: 1 commands 12 | [Container] 2020/02/11 22:37:40 INSTALL: 2 commands 13 | [Container] 2020/02/11 22:37:40 PRE_BUILD: 2 commands 14 | [Container] 2020/02/11 22:37:40 Phase complete: DOWNLOAD_SOURCE State: SUCCEEDED 15 | [Container] 2020/02/11 22:37:40 Phase context status code: Message: 16 | [Container] 2020/02/11 22:37:41 Entering phase INSTALL 17 | [Container] 2020/02/11 22:37:41 Running command echo Installing Serverless… 18 | Installing Serverless… 19 |   20 | [Container] 2020/02/11 22:37:41 Running command npm install -g serverless 21 | npm ERR! code E404 22 | npm ERR! 404 Not Found: 2-thenable@^1.0.0 23 |   24 | npm ERR! A complete log of this run can be found in: 25 | npm ERR! /root/.npm/_logs/2020-02-11T22_37_46_374Z-debug.log 26 |   27 | [Container] 2020/02/11 22:37:46 Command did not exit successfully npm install -g serverless exit status 1 28 | [Container] 2020/02/11 22:37:46 Phase complete: INSTALL State: FAILED 29 | [Container] 2020/02/11 22:37:46 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: npm install -g serverless. Reason: exit status 1 30

seems like npm fixed the issue.

Thanks everyone 👯‍♀️

Its works for me without doing any changes… Thanks everyone for your support

This error is fixed for us.

Grabbing directly from Github works in CodeBuild:

- npm install --verbose -g git+https://github.com/medikoo/2-thenable.git

Also, updating npm fixed it in CodeBuild standard / nodejs:8 runtime

version: 0.2

phases:
  install:
    runtime-versions:
      nodejs: 8
  build:
    commands:
      - npm install -g npm # Update npm
      - npm install -g 2-thenable

Working here, thanks!

i update npm to latest to solve

same for me AWS codebuild

Having the same issue but not in CodeBuild. This is in AWS however.

yarn install v1.21.1 [1/4] Resolving packages… error Couldn’t find package “2-thenable@^1.0.0” required by “stream-promise@^3.2.0” on the “npm” registry. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. The command ‘/bin/sh -c yarn’ returned a non-zero code: 1 error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ERROR: Job failed: exit code 1

We were having this issue when fetching 2-thenable with npm 5.3.0. After upgrading to npm 6.13.7 we are no longer having this issue.

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/8.6.0/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'install',
1 verbose cli   '-g',
1 verbose cli   '2-thenable' ]
2 info using npm@5.3.0
3 info using node@v8.6.0
4 verbose npm-session 15d57cc6ecde698a
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 404 https://registry.npmjs.org/2-thenable 88ms
8 silly fetchPackageMetaData error for 2-thenable@latest 404 Not Found: 2-thenable@latest
9 verbose stack Error: 404 Not Found: 2-thenable@latest
9 verbose stack     at fetch.then.res (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/fetch.js:41:19)
9 verbose stack     at runCallback (timers.js:781:20)
9 verbose stack     at tryOnImmediate (timers.js:743:5)
9 verbose stack     at processImmediate [as _immediateCallback] (timers.js:714:5)
9 verbose stack From previous event:
9 verbose stack     at regFetch (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/fetch.js:35:6)
9 verbose stack     at fetchPackument (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/manifest.js:80:10)
9 verbose stack     at getManifest (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/manifest.js:37:10)
9 verbose stack     at manifest (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/manifest.js:24:10)
9 verbose stack     at Object.manifest (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/index.js:12:12)
9 verbose stack     at Object.Fetcher#manifest [as manifest] (/usr/local/lib/node_modules/npm/node_modules/pacote/node_modules/protoduck/node_modules/genfun/lib/genfun.js:15:38)
9 verbose stack     at manifest (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/fetch.js:16:18)
9 verbose stack     at pinflight (/usr/local/lib/node_modules/npm/node_modules/pacote/manifest.js:24:12)
9 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/promise-inflight/inflight.js:29:24
9 verbose stack From previous event:
9 verbose stack     at _inflight (/usr/local/lib/node_modules/npm/node_modules/promise-inflight/inflight.js:28:25)
9 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/promise-inflight/inflight.js:22:14
9 verbose stack     at runCallback (timers.js:781:20)
9 verbose stack     at tryOnImmediate (timers.js:743:5)
9 verbose stack     at processImmediate [as _immediateCallback] (timers.js:714:5)
9 verbose stack From previous event:
9 verbose stack     at inflight (/usr/local/lib/node_modules/npm/node_modules/promise-inflight/inflight.js:14:40)
9 verbose stack     at Object.manifest (/usr/local/lib/node_modules/npm/node_modules/pacote/manifest.js:22:10)
9 verbose stack     at fetchPackageMetadata (/usr/local/lib/node_modules/npm/lib/fetch-package-metadata.js:58:10)
9 verbose stack     at limited (/usr/local/lib/node_modules/npm/node_modules/call-limit/call-limit.js:29:10)
9 verbose stack     at fs.stat (/usr/local/lib/node_modules/npm/lib/install/deps.js:208:20)
9 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:284:29
9 verbose stack     at FSReqWrap.oncomplete (fs.js:153:21)

@mjbrowning1 we are having this issue on GitHub Actions and Codeship 😦