create-react-app: error Couldn't find package "@timer/detect-port" on the "npm" registry

If you are reporting a bug, please fill in below. Otherwise feel free to remove this template entirely.

Can you reproduce the problem with latest npm?

Yes

Many errors, especially related to “missing modules”, are due to npm bugs.

If you’re using Windows, follow these instructions to update npm.

If you’re using OS X or Linux, run this to update npm:

npm install -g npm@latest

cd your_project_directory
rm -rf node_modules
npm install

Then try to reproduce the issue again.

Can you still reproduce it? Yes

Description

create-react-app my-project
Creating a new React app in /Users/z013mrq/my-project.

Installing packages. This might take a couple minutes.
Installing react, react-dom, and react-scripts...

yarn add v0.23.4
info No lockfile found.
[1/4] 🔍  Resolving packages...
error Couldn't find package "@timer/detect-port" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Aborting installation.
  yarnpkg add --exact react react-dom react-scripts has failed.

Deleting generated file... package.json
Deleting my-project / from /Users/z013mrq
Done.

What are you reporting?

Expected behavior

Tell us what you think should happen.

Actual behavior

Tell us what actually happens.

Environment

Run these commands in the project folder and fill in their results:

  1. npm ls react-scripts (if you haven’t ejected):
  2. node -v:
  3. npm -v:

Then, specify:

  1. Operating system:
  2. Browser and version:

Reproducible Demo

Please take the time to create a new app that reproduces the issue.

Alternatively, you could copy your app that experiences the problem and start removing things until you’re left with the minimal reproducible demo.

(Accidentally, you might get to the root of your problem during that process.)

Push to GitHub and paste the link here.

By doing this, you’re helping the Create React App contributors a big time! Demonstrable issues gets fixed faster.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 25 (8 by maintainers)

Most upvoted comments

I am using a private npm registry and came across the same issue. I understand that this is not CRA issue.

My workaround is to bypass my private registry for this package alone.

npm config set @timer:registry https://registry.npmjs.org/

Hope this helps for others who have a similar issue.

I’m closing because there’s nothing actionable for us here. The problem is with the npm registry you are using (either a private registry or an unofficial mirror). Please make sure your npm registry supports scoped packages, or use the official npm registry.

npm logout helped

Many ways you can solve this issue in your local machine.

Problem here is create-reat-app is looking for package "@timer/detect-port" on the “npm” registry but package doesn’t exist.

when you do create-reat-app my-project yarn will go and search for packages from of npm registry (userconfig registry=xxxx)

First thing you should do is check which npm registry it points to npm config list -l There will be multiple registry at global level , user level etc …

; userconfig xxx
registry = "https://registry.npmjs.org/"

; globalconfig xxxx
registry = "https://registry.npmjs.org/"

Now if user level registry point to your private npm registry make sure it contains dependency. or you can change it to npm’s default registry to https://registry.npmjs.org

I ran into this issue while playing with it today. I use private npm registry so change it to default npm one and it resolved this particular issue.