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:

Is someone facing the same problem?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 37
- Comments: 54 (8 by maintainers)
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.orgEdit: I also use nodejs 10.x because packages like the serverless-image-handler don’t support 12.x yet
Response from npm:
I still get this error
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.gitAlso, updating npm fixed it in CodeBuild standard / nodejs:8 runtime
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.
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!
https://github.com/yarnpkg/yarn/issues/7902
Please report to AWS support, that there’s some issue with npm registry mirror on their side. Point that
2-thenable@^1.0.0is 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
npmfixed the issue.Thanks everyone 👯♀️
Its works for me without doing any changes… Thanks everyone for your support
This error is fixed for us.
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.
@mjbrowning1 we are having this issue on GitHub Actions and Codeship 😦