question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't npm install next

See original GitHub issue

Bug report

Describe the bug

When you install from scratch in a clean repo, you get 404 error with a @ampproject/toolbox-optimizer dependency:

npm install next react react-dom
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated mkdirp@0.5.3: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@ampproject%2ftoolbox-optimizer - Not found
npm ERR! 404 
npm ERR! 404  '@ampproject/toolbox-optimizer@2.5.14' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'next'
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/lovebeam/.npm/_logs/2020-08-06T09_14_31_325Z-debug.log
➜  gramotool git:(master) ✗ npm install next@9.4.0 react react-dom
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated mkdirp@0.5.3: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@ampproject%2ftoolbox-optimizer - Not found
npm ERR! 404 
npm ERR! 404  '@ampproject/toolbox-optimizer@2.3.1' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'next'
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Create empty folder, make npm init.
  2. Type npm install next react react-dom as it said in Nextjs docs.
  3. Get an error with a dependency not found

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:10
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

11reactions
Janpotcommented, Aug 6, 2020

npm is having trouble, you can follow their status page.

0reactions
balazsorban44commented, Jan 29, 2022

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Npm can't install any packages - node.js - Stack Overflow
If you are a windows user run cmd as administrator and then install packages. It worked for me while installing express via npm....
Read more >
Next.js - npm
Start using next in your project by running `npm i next`. There are 2732 other projects in the npm registry using next.
Read more >
module-not-found - Next.js
The module you're trying to import is not installed in your dependencies ... When importing a module from npm this module has to...
Read more >
How to fix npm install command not working
The error above happens when npm can't be found under the PATH environment variable. First, you need to make sure that npm is...
Read more >
How to install Next.js - Flavio Copes
Make sure that you have the latest version of Node. Check with running node -v in your terminal, and compare it to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found