If you are reporting a bug, please fill in below. Otherwise feel free to remove this template entirely.
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
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?
Tell us what you think should happen.
Tell us what actually happens.
Run these commands in the project folder and fill in their results:
npm ls react-scripts (if you haven鈥檛 ejected): node -v: npm -v:Then, specify:
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鈥檙e 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.
Are you using a registry mirror by chance?
@Timer we have a private npm registry as well. What do mean by registry mirror ? I have some entry in global .npmrc
Are you using sinopia? It seems they don't support scoped packages: https://github.com/rlidwka/sinopia/issues/278
_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.
@nikunjchapadia can you explain this,
Now if user level registry point to your private npm registry make sure it contains dependency
If you are using your private npm registry, it must contains @timer/detect-port and other packages else it will not able to find there to download it.
I think this is duplicated with #2268
I run into the same problem here on windows.
Here is my configuration
I initally had a private registry (nexus) configured that maybe led to this error. But i then modified my npm config to point to the npmjs registry, with no luck.
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.
Actually, like i explained i initially had a private registry configured, but then changed my config to npmjs, so i'm not sure this is only related to the fact that we use private registries...
Is there a way to keep the npm-debug.log file after create-react-app failed command ?
I had the same issue and fixed it by running npm install -g npm@latest and upgrading npm from 3.10.10 to 4.6.1. I'm on Ubuntu 16.04, but otherwise had the same configuration as @ricovitch.
Is there a way to keep the npm-debug.log file after create-react-app failed command ?
No but we鈥檒l happily take a PR that implements it.
I am having same issue with _nodejs_: 0.10.25 with _npm:_ 1.3.10. Here is what debug log says:
25089 http 404 https://registry.npmjs.org/timer/detect-port/1.1.3
25090 silly registry.get cb [ 404,
25090 silly registry.get { server: 'CouchDB/1.5.0 (Erlang OTP/R16B03)',
25090 silly registry.get 'content-type': 'application/json',
25090 silly registry.get 'cache-control': 'max-age=0',
25090 silly registry.get 'content-length': '40',
25090 silly registry.get 'accept-ranges': 'bytes',
25090 silly registry.get date: 'Sat, 27 May 2017 08:25:22 GMT',
25090 silly registry.get via: '1.1 varnish',
25090 silly registry.get age: '0',
25090 silly registry.get connection: 'keep-alive',
25090 silly registry.get 'x-served-by': 'cache-fra1244-FRA',
25090 silly registry.get 'x-cache': 'MISS',
25090 silly registry.get 'x-cache-hits': '0',
25090 silly registry.get 'x-timer': 'S1495873522.724353,VS0,VE320' } ]
25091 silly lockFile cdca6107-timer-detect-port-1-1-3 timer/[email protected]
25092 silly lockFile cdca6107-timer-detect-port-1-1-3 timer/[email protected]
Then finally the error in debug report:
25119 error 404 'timer' is not in the npm registry.
25119 error 404 You should bug the author to publish it
25119 error 404
25119 error 404 Note that you can also install from a
25119 error 404 tarball, folder, or http url, or git url.
25120 error System Linux 4.4.0-31-generic
25121 error command "/usr/bin/nodejs" "/usr/bin/npm" "install"
Could anyone point me in right direction? I am actually new to React.
npm 1.x is not supported (this is a very old version).
Please update at least to npm 3.
Node 0.10 is not supported either. As the README mentions, Create React App works with Node 6 and higher.
Thanks @gaearon after upgrading _nodejs_ 7.10.0 and _npm_ 4.2.0 this issue got fixed.
I had the same problem today with node v6.10.2.
npm ERR! Darwin 16.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--save" "--save-exact" "react" "react-dom" "react-scripts"
npm ERR! node v6.10.2
npm ERR! npm v3.10.10
npm ERR! Invalid name: "@timer/detect-port"
I can confirm that running npm install -g npm@latest fixes the problem.
thanks @kenmansour! thats exactly what I needed.
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.
workaround from @prasann works. Alternative solution is to create a .npmrc file in the projects root directory and add the following line:
@timer:registry=https://registry.npmjs.org/
this way it will be available for all devs working on that project.
I agree that there is a workaround available. But the expectation with create-react-app is so high that any installation issue seems wrong to me. We should try to get rid of scoped packages at least at level 1
We'll get a fix out in a few days, but again, we're using a completely supported npm feature. It is your decision to use npm registries and proxies. I respect that you might need them, but please give us time to roll out an update that works around it.
Fixed in 1.0.8. Please verify.
https://github.com/facebookincubator/create-react-app/releases/tag/v1.0.8
npm logout helped
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.
Thanks much. This solved by problem
Most helpful comment
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.