I tried using both npm and npx but getting same error..missing package dependencies
Asked
Active
Viewed 948 times
0

Drew Reese
- 165,259
- 14
- 153
- 181
-
1Please try to post any error messages as plain text. Can you also share the generated package.json file that is supposedly missing dependencies? – Drew Reese May 22 '20 at 04:00
-
{ "name": "my-app", "version": "0.1.0", "private": true } this was the content found in Package.json file – Sivakumar Selvaraj May 22 '20 at 04:41
-
Yeah, there's no dependencies key there. Do you happen to know what version of create-react-app you have installed? Maybe reinstall it (`npm un -g create-react-app` then `npm i -g create-react-app`). – Drew Reese May 22 '20 at 04:46
-
create-react-app version 3.4.1, uninstalled create-react-app and reinstalled it.Still same error "Missing Dependencies" while using `npx create-react-app my-app --use-npm` – Sivakumar Selvaraj May 22 '20 at 05:08
-
@SivakumarSelvaraj I suggest to don't use ```--use-npm``` option. You can install ```create-react-app``` with npm also. – Stoic Lion May 22 '20 at 08:09
-
@SorcererApprentice I also used this command to create app `npm init react-app my-app` still same error..... missing dependencies – Sivakumar Selvaraj May 22 '20 at 08:40
-
@SivakumarSelvaraj can you share with us your package.json file. This error is very strange. try to use something like ```npm create-react-app --scripts-version=x.x.x``` and specify the version of the react scripts you would use. – Stoic Lion May 22 '20 at 09:19
-
shared package.json content in my first comment..no dependencies getting added, tried every possible ways to install but is result same error....maybe problem is with my Windows 10. because I installed the same way in my friend's system and it works – Sivakumar Selvaraj May 22 '20 at 12:35
-
CRA has node and npm dependencies, have you verified you have recent enough versions of each installed on your windows box? – Drew Reese May 22 '20 at 19:00
-
Yes I checked my `node -v 12.16.3` and `npm -v 6.14.4`....I think this version is enough for CRA....I also tried reinstalling entire node – Sivakumar Selvaraj May 23 '20 at 02:58
1 Answers
0
Thanks @DrewReese and @Sorcerer for your replies .......I found that some .ps1 and .cmd files generated to the root folder while using npx create-react-app my-app
. In order to remove .ps1 & .cmd files from the root folder i need to remove prefix
from the file %USERPROFILE%.npmrc
and it fixed my issue