Create-react-app: missing dependencies in package.json when using "create-react-app my-app"command

Created on 28 Nov 2018  Â·  16Comments  Â·  Source: facebook/create-react-app

Is this a bug report?

Yes

Did you try recovering your dependencies?

(Write your answer here.)

Which terms did you search for in User Guide?

(Write your answer here if relevant.)

Environment

(paste the output of the command here)

Steps to Reproduce

(Write your steps here:)



    1. 2.
  1. 3.

Expected Behavior

(Write what you thought would happen.)

Actual Behavior

(Write what happened. Please add screenshots!)

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

stale

Most helpful comment

image

All 16 comments

image

@wangdongna Even I was also facing the same issue until the 3rd step npm was running fine but during the 3rd step it just pauses for a while and prompts the message 'Missing dependencies in package.json'

I didn't get it because create-react-app is generating the folder and package file so how can it miss dependencies which means it is a bug over win32 system

npx create-react-app client

Creating a new React app in D:\client.

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

yarn add v1.8.0
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
Missing dependencies in package.json

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

I just experienced the same issue. (to make sure this doesn't get closed automatically)

create-react-app: 2.1.2
yarn: 1.12.3
Windows 10

Experienced issue here:

create-react-app: 2.1.2
yarn: 1.12.3
OSX

This seems to be a Yarn issue.

Temporary workaround :

create-react-app myproject --use-npm

Experienced the issue with --use-npm.
create-react-app: v1.13.0
npm: v6.4.1
node: v10.15.0
Win10

Got this error:
npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! https://npm.community

npm ERR! A complete log of this run can be found in:
npm ERR! C:Userskavanagh_joAppDataRoamingnpm-cache_logs2019-01-10T16_06_45_927Z-debug.log

Issue also reported here : https://npm.community/t/cb-never-called/417. No answers on the threqad tho.

To fix the terminal error “cb() never called!” Increase the ulimit in your .bashrc, .bash_profile, and/or .profile by updating (or removing) the below command:

Current: ulimit -n 2000
Updated: ulimit -n 20000

As @corentindesfarges said it's something related with yarn. My create-react-app didn't work again after I installed yarn, using create-react-app myproject --use-npmresolved my problem.

Experienced issue here:

create-react-app: 2.1.5
yarn: 1.13.0
Win10

$ create-react-app my-app
Creating a new React app in F:playgroundreactmy-app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
yarn add v1.13.0
[1/4] Resolving packages...
[2/4] Fetching packages...
Missing dependencies in package.json

Win10
create-react-app myproject --use-npm
also stuck in "Installing react, react-dom,.. "
package.json really no "dependencies"

This seems to be a Yarn issue.

Temporary workaround :

create-react-app myproject --use-npm

same here

I'm currently experiencing the same issue, even when using the --use-npm flag. I'm using [email protected].

Edit: Upgrading npm/npx to latest 6.9.0 solved the problem for me.
This command ended up working for me: npx create-react-app myproject --use-npm

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue.

Was this page helpful?
0 / 5 - 0 ratings