npm version: 6.9.0
I read the troubleshooting page (https://facebook.github.io/create-react-app/docs/troubleshooting) and saw nothing of relevance.
I am running on Windows 10, with node version 10.15.3, npm version 6.9.0, and create-react-app version 3.0.1. The environment says it does not find create-react-app even though it is definitely installed globally. I just updated it with "npm install -g npm@latest" to be absolutely sure.
Environment Info:
System:
OS: Windows 10
CPU: (12) x64 Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz
Binaries:
Node: 10.15.3 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: 42.17134.1.0
Internet Explorer: 11.0.17134.1
npmPackages:
react: Not Found
react-dom: Not Found
react-scripts: Not Found
npmGlobalPackages:
create-react-app: Not Found
Just try to create a react app with create-react-app: "npx create-react-app syn-mgr"
I anticipated the app would be created, and I would be writing code right now.
The create failed. Following is the log file. The only oddity with my system is that I am in a rural area with dreadfully slow 3.0 Megabit DSL. (There is nothing faster available here.) Some systems misinterpret this slow connection to be timing out when, in reality, it is just God-awful slow--but still functioning properly.
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\Anthony\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli '--save',
1 verbose cli '--save-exact',
1 verbose cli '--loglevel',
1 verbose cli 'error',
1 verbose cli 'react',
1 verbose cli 'react-dom',
1 verbose cli 'react-scripts' ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session 1a6738c28c990ad5
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 304 https://registry.npmjs.org/react-scripts 288ms (from cache)
8 silly pacote tag manifest for react-scripts@latest fetched in 301ms
9 http fetch GET 304 https://registry.npmjs.org/react 311ms (from cache)
10 silly pacote tag manifest for react@latest fetched in 332ms
11 http fetch GET 304 https://registry.npmjs.org/react-dom 324ms (from cache)
12 silly pacote tag manifest for react-dom@latest fetched in 333ms
13 timing stage:loadCurrentTree Completed in 378ms
14 silly install loadIdealTree
15 silly install cloneCurrentTreeToIdealTree
16 timing stage:loadIdealTree:cloneCurrentTree Completed in 1ms
17 silly install loadShrinkwrap
18 timing stage:loadIdealTree:loadShrinkwrap Completed in 0ms
19 silly install loadAllDepsIntoIdealTree
20 silly resolveWithNewModule [email protected] checking installable status
21 silly resolveWithNewModule [email protected] checking installable status
22 silly resolveWithNewModule [email protected] checking installable status
23 http fetch GET 304 https://registry.npmjs.org/prop-types 81ms (from cache)
24 silly pacote range manifest for prop-types@^15.6.2 fetched in 87ms
25 silly resolveWithNewModule [email protected] checking installable status
26 http fetch GET 304 https://registry.npmjs.org/object-assign 88ms (from cache)
27 silly pacote range manifest for object-assign@^4.1.1 fetched in 94ms
28 silly resolveWithNewModule [email protected] checking installable status
29 http fetch GET 304 https://registry.npmjs.org/scheduler 101ms (from cache)
30 silly pacote range manifest for scheduler@^0.13.6 fetched in 108ms
31 silly resolveWithNewModule [email protected] checking installable status
32 http fetch GET 304 https://registry.npmjs.org/loose-envify 199ms (from cache)
33 silly pacote range manifest for loose-envify@^1.1.0 fetched in 206ms
34 silly resolveWithNewModule [email protected] checking installable status
35 http fetch GET 304 https://registry.npmjs.org/js-tokens 69ms (from cache)
36 silly pacote range manifest for js-tokens@^3.0.0 || ^4.0.0 fetched in 75ms
37 silly resolveWithNewModule [email protected] checking installable status
38 http fetch GET 304 https://registry.npmjs.org/react-is 69ms (from cache)
39 silly pacote range manifest for react-is@^16.8.1 fetched in 76ms
40 silly resolveWithNewModule [email protected] checking installable status
41 http fetch GET 304 https://registry.npmjs.org/@babel%2fcore 84ms (from cache)
42 silly pacote version manifest for @babel/[email protected] fetched in 91ms
43 silly resolveWithNewModule @babel/[email protected] checking installable status
44 http fetch GET 304 https://registry.npmjs.org/case-sensitive-paths-webpack-plugin 82ms (from cache)
45 silly pacote version manifest for [email protected] fetched in 88ms
46 silly resolveWithNewModule [email protected] checking installable status
47 http fetch GET 304 https://registry.npmjs.org/@typescript-eslint%2feslint-plugin 204ms (from cache)
48 silly fetchPackageMetaData error for @typescript-eslint/[email protected] Unexpected end of JSON input while parsing near '...\r\n"},"engines":{"no'
49 http fetch GET 304 https://registry.npmjs.org/@svgr%2fwebpack 248ms (from cache)
50 silly pacote version manifest for @svgr/[email protected] fetched in 255ms
51 silly resolveWithNewModule @svgr/[email protected] checking installable status
52 http fetch GET 304 https://registry.npmjs.org/@typescript-eslint%2fparser 260ms (from cache)
53 silly pacote version manifest for @typescript-eslint/[email protected] fetched in 280ms
54 silly resolveWithNewModule @typescript-eslint/[email protected] checking installable status
55 http fetch GET 304 https://registry.npmjs.org/babel-jest 290ms (from cache)
56 http fetch GET 304 https://registry.npmjs.org/babel-loader 297ms (from cache)
57 silly pacote range manifest for babel-jest@^24.8.0 fetched in 298ms
58 silly resolveWithNewModule [email protected] checking installable status
59 silly pacote version manifest for [email protected] fetched in 303ms
60 silly resolveWithNewModule [email protected] checking installable status
61 http fetch GET 304 https://registry.npmjs.org/css-loader 134ms (from cache)
62 silly pacote version manifest for [email protected] fetched in 141ms
63 silly resolveWithNewModule [email protected] checking installable status
64 http fetch GET 304 https://registry.npmjs.org/babel-plugin-named-asset-import 321ms (from cache)
65 silly pacote range manifest for babel-plugin-named-asset-import@^0.3.2 fetched in 326ms
66 silly resolveWithNewModule [email protected] checking installable status
67 http fetch GET 304 https://registry.npmjs.org/babel-eslint 341ms (from cache)
68 silly pacote version manifest for [email protected] fetched in 348ms
69 silly resolveWithNewModule [email protected] checking installable status
70 http fetch GET 304 https://registry.npmjs.org/dotenv 145ms (from cache)
71 silly pacote version manifest for [email protected] fetched in 151ms
72 silly resolveWithNewModule [email protected] checking installable status
73 http fetch GET 304 https://registry.npmjs.org/camelcase 369ms (from cache)
74 silly pacote range manifest for camelcase@^5.2.0 fetched in 375ms
75 silly resolveWithNewModule [email protected] checking installable status
76 http fetch GET 304 https://registry.npmjs.org/babel-preset-react-app 386ms (from cache)
77 silly pacote range manifest for babel-preset-react-app@^9.0.0 fetched in 394ms
78 silly resolveWithNewModule [email protected] checking installable status
79 http fetch GET 304 https://registry.npmjs.org/dotenv-expand 146ms (from cache)
80 silly pacote version manifest for [email protected] fetched in 152ms
81 silly resolveWithNewModule [email protected] checking installable status
82 http fetch GET 304 https://registry.npmjs.org/eslint 138ms (from cache)
83 silly fetchPackageMetaData error for eslint@^5.16.0 Unexpected end of JSON input while parsing near '...:"~0.2.0","user-home"'
84 http fetch GET 304 https://registry.npmjs.org/eslint-config-react-app 137ms (from cache)
85 silly pacote range manifest for eslint-config-react-app@^4.0.1 fetched in 143ms
86 silly resolveWithNewModule [email protected] checking installable status
87 http fetch GET 304 https://registry.npmjs.org/eslint-loader 145ms (from cache)
88 silly pacote version manifest for [email protected] fetched in 151ms
89 silly resolveWithNewModule [email protected] checking installable status
90 http fetch GET 304 https://registry.npmjs.org/eslint-plugin-flowtype 151ms (from cache)
91 silly pacote version manifest for [email protected] fetched in 160ms
92 silly resolveWithNewModule [email protected] checking installable status
93 http fetch GET 304 https://registry.npmjs.org/eslint-plugin-import 154ms (from cache)
94 silly pacote version manifest for [email protected] fetched in 161ms
95 silly resolveWithNewModule [email protected] checking installable status
96 http fetch GET 304 https://registry.npmjs.org/eslint-plugin-jsx-a11y 148ms (from cache)
97 silly pacote version manifest for [email protected] fetched in 155ms
98 silly resolveWithNewModule [email protected] checking installable status
99 http fetch GET 304 https://registry.npmjs.org/eslint-plugin-react 156ms (from cache)
100 silly pacote version manifest for [email protected] fetched in 163ms
101 silly resolveWithNewModule [email protected] checking installable status
102 http fetch GET 304 https://registry.npmjs.org/eslint-plugin-react-hooks 151ms (from cache)
103 silly pacote range manifest for eslint-plugin-react-hooks@^1.5.0 fetched in 158ms
104 silly resolveWithNewModule [email protected] checking installable status
105 http fetch GET 304 https://registry.npmjs.org/file-loader 155ms (from cache)
106 http fetch GET 304 https://registry.npmjs.org/fs-extra 148ms (from cache)
107 silly pacote version manifest for [email protected] fetched in 162ms
108 silly resolveWithNewModule [email protected] checking installable status
109 silly pacote version manifest for [email protected] fetched in 155ms
110 silly resolveWithNewModule [email protected] checking installable status
111 http fetch GET 304 https://registry.npmjs.org/identity-obj-proxy 138ms (from cache)
112 http fetch GET 304 https://registry.npmjs.org/html-webpack-plugin 162ms (from cache)
113 silly pacote version manifest for [email protected] fetched in 146ms
114 silly resolveWithNewModule [email protected] checking installable status
115 silly pacote version manifest for [email protected] fetched in 171ms
116 silly resolveWithNewModule [email protected] checking installable status
117 http fetch GET 304 https://registry.npmjs.org/is-wsl 145ms (from cache)
118 silly pacote range manifest for is-wsl@^1.1.0 fetched in 151ms
119 silly resolveWithNewModule [email protected] checking installable status
120 http fetch GET 304 https://registry.npmjs.org/jest 137ms (from cache)
121 silly pacote version manifest for [email protected] fetched in 146ms
122 silly resolveWithNewModule [email protected] checking installable status
123 http fetch GET 304 https://registry.npmjs.org/jest-environment-jsdom-fourteen 139ms (from cache)
124 silly pacote version manifest for [email protected] fetched in 145ms
125 silly resolveWithNewModule [email protected] checking installable status
126 http fetch GET 304 https://registry.npmjs.org/jest-resolve 145ms (from cache)
127 silly pacote version manifest for [email protected] fetched in 153ms
128 silly resolveWithNewModule [email protected] checking installable status
129 http fetch GET 304 https://registry.npmjs.org/jest-watch-typeahead 140ms (from cache)
130 silly pacote version manifest for [email protected] fetched in 148ms
131 silly resolveWithNewModule [email protected] checking installable status
132 http fetch GET 304 https://registry.npmjs.org/mini-css-extract-plugin 141ms (from cache)
133 silly pacote version manifest for [email protected] fetched in 148ms
134 silly resolveWithNewModule [email protected] checking installable status
135 http fetch GET 304 https://registry.npmjs.org/optimize-css-assets-webpack-plugin 136ms (from cache)
136 silly pacote version manifest for [email protected] fetched in 143ms
137 silly resolveWithNewModule [email protected] checking installable status
138 http fetch GET 304 https://registry.npmjs.org/pnp-webpack-plugin 150ms (from cache)
139 silly pacote version manifest for [email protected] fetched in 158ms
140 silly resolveWithNewModule [email protected] checking installable status
141 http fetch GET 304 https://registry.npmjs.org/postcss-flexbugs-fixes 136ms (from cache)
142 silly pacote version manifest for [email protected] fetched in 142ms
143 silly resolveWithNewModule [email protected] checking installable status
144 http fetch GET 304 https://registry.npmjs.org/postcss-loader 145ms (from cache)
145 silly pacote version manifest for [email protected] fetched in 151ms
146 silly resolveWithNewModule [email protected] checking installable status
147 http fetch GET 304 https://registry.npmjs.org/postcss-normalize 153ms (from cache)
148 silly pacote version manifest for [email protected] fetched in 160ms
149 silly resolveWithNewModule [email protected] checking installable status
150 http fetch GET 304 https://registry.npmjs.org/postcss-preset-env 144ms (from cache)
151 silly pacote version manifest for [email protected] fetched in 152ms
152 silly resolveWithNewModule [email protected] checking installable status
153 http fetch GET 304 https://registry.npmjs.org/react-dev-utils 147ms (from cache)
154 silly pacote range manifest for react-dev-utils@^9.0.1 fetched in 154ms
155 silly resolveWithNewModule [email protected] checking installable status
156 http fetch GET 304 https://registry.npmjs.org/resolve 147ms (from cache)
157 silly pacote version manifest for [email protected] fetched in 154ms
158 silly resolveWithNewModule [email protected] checking installable status
159 http fetch GET 304 https://registry.npmjs.org/sass-loader 143ms (from cache)
160 silly pacote version manifest for [email protected] fetched in 150ms
161 silly resolveWithNewModule [email protected] checking installable status
162 http fetch GET 304 https://registry.npmjs.org/postcss-safe-parser 220ms (from cache)
163 silly pacote version manifest for [email protected] fetched in 226ms
164 silly resolveWithNewModule [email protected] checking installable status
165 http fetch GET 304 https://registry.npmjs.org/semver 147ms (from cache)
166 http fetch GET 304 https://registry.npmjs.org/react-app-polyfill 214ms (from cache)
167 silly pacote version manifest for [email protected] fetched in 153ms
168 silly resolveWithNewModule [email protected] checking installable status
169 silly pacote range manifest for react-app-polyfill@^1.0.1 fetched in 220ms
170 silly resolveWithNewModule [email protected] checking installable status
171 http fetch GET 304 https://registry.npmjs.org/style-loader 146ms (from cache)
172 silly pacote version manifest for [email protected] fetched in 151ms
173 silly resolveWithNewModule [email protected] checking installable status
174 http fetch GET 304 https://registry.npmjs.org/terser-webpack-plugin 145ms (from cache)
175 silly pacote version manifest for [email protected] fetched in 153ms
176 silly resolveWithNewModule [email protected] checking installable status
177 http fetch GET 304 https://registry.npmjs.org/ts-pnp 136ms (from cache)
178 silly pacote version manifest for [email protected] fetched in 141ms
179 silly resolveWithNewModule [email protected] checking installable status
180 http fetch GET 304 https://registry.npmjs.org/url-loader 137ms (from cache)
181 silly pacote version manifest for [email protected] fetched in 143ms
182 silly resolveWithNewModule [email protected] checking installable status
183 http fetch GET 304 https://registry.npmjs.org/webpack 116ms (from cache)
184 silly pacote version manifest for [email protected] fetched in 132ms
185 silly resolveWithNewModule [email protected] checking installable status
186 http fetch GET 304 https://registry.npmjs.org/webpack-dev-server 120ms (from cache)
187 silly pacote version manifest for [email protected] fetched in 130ms
188 silly resolveWithNewModule [email protected] checking installable status
189 http fetch GET 304 https://registry.npmjs.org/workbox-webpack-plugin 117ms (from cache)
190 silly pacote version manifest for [email protected] fetched in 123ms
191 silly resolveWithNewModule [email protected] checking installable status
192 http fetch GET 304 https://registry.npmjs.org/fsevents 126ms (from cache)
193 silly pacote version manifest for [email protected] fetched in 133ms
194 warn deprecated [email protected]: Please update: there are crash fixes
195 silly resolveWithNewModule [email protected] checking installable status
196 http fetch GET 304 https://registry.npmjs.org/webpack-manifest-plugin 185ms (from cache)
197 silly pacote version manifest for [email protected] fetched in 193ms
198 silly resolveWithNewModule [email protected] checking installable status
199 timing stage:rollbackFailedOptional Completed in 0ms
200 timing stage:runTopLevelLifecycles Completed in 1817ms
201 silly saveTree [email protected]
201 silly saveTree +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | | `-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | | `-- [email protected]
201 silly saveTree | `-- [email protected]
201 silly saveTree +-- [email protected]
201 silly saveTree | +-- @babel/[email protected]
201 silly saveTree | | `-- [email protected]
201 silly saveTree | +-- @svgr/[email protected]
201 silly saveTree | +-- @typescript-eslint/[email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | | `-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | +-- [email protected]
201 silly saveTree | `-- [email protected]
201 silly saveTree `-- [email protected]
202 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '...\r\n"},"engines":{"no'
202 verbose stack at JSON.parse (<anonymous>)
202 verbose stack at parseJson (C:\Users\Anthony\AppData\Roaming\npm\node_modules\npm\node_modules\json-parse-better-errors\index.js:7:17)
202 verbose stack at consumeBody.call.then.buffer (C:\Users\Anthony\AppData\Roaming\npm\node_modules\npm\node_modules\node-fetch-npm\src\body.js:96:50)
202 verbose stack at process._tickCallback (internal/process/next_tick.js:68:7)
203 verbose cwd E:\Projects\CogniLogics\syn-mgr
204 verbose Windows_NT 10.0.17134
205 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Anthony\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save" "--save-exact" "--loglevel" "error" "react" "react-dom" "react-scripts"
206 verbose node v10.15.3
207 verbose npm v6.9.0
208 error Unexpected end of JSON input while parsing near '...\r\n"},"engines":{"no'
209 verbose exit [ 1, true ]
Just fyi, create-react-app doesn't need to (and really shouldn't) be installed globally anymore; npx will fetch the latest version. Try running the command that failed directly?
npm install --save --save-exact --loglevel error react react-dom react-scripts
@agatlin Please try the following steps,
I also have this issue and cleaning the cache does nothing. It not working with v8 nor 10.16 :/
Seems the problem is yarn force it to use npm:
create-react-app myproject --use-npm
I did have similar issue. Creation was going fine, but I couldn't npm start. I did have this:
> react-scripts start
There might be a problem with the project dependency tree.
It is likely not a bug in Create React App, but something you need to fix locally.
The react-scripts package provided by Create React App requires a dependency:
"babel-loader": "8.0.5"
Don't try to install it manually: your package manager does it automatically.
However, a different version of babel-loader was detected higher up in the tree:
/Users/alund/prj/@lundiak/my-react-app/node_modules/babel-loader (version: 8.0.6)
and so on...
I tried different manipulation, and as this issue suggested even --use-npm didn't help me.
But u will be laughing, solution is easy, and partially it was my fault.
I did use bash script to automate my React App AND !!! Storybook.
npx create-react-app my-react-app
cd my-react-app
npx -p @storybook/cli sb init # was here --type react
npm start
# npm run storybook
So script failed on npm start, and the reason was that npx -p @storybook/cli sb init SHOULD NOT have type as react, but instead react-scripts or OMITTED (because storybook CLI can recognise project type by itself).
I also have this issue and cleaning the cache does nothing. It not working with v8 nor 10.16 :/
Update
Seems the problem is yarn force it to use npm:
create-react-app myproject --use-npm
THIS one works form me... :) tx
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.
Most helpful comment
I also have this issue and cleaning the cache does nothing. It not working with v8 nor 10.16 :/
Update
Seems the problem is yarn force it to use npm: