npx create-rect应用程序不工作,而是抛出错误



我已经尝试使用命令npx create-react-app有一段时间了,但我一直以这种方式遇到错误。

我正在开发一个windows 10,npm版本-7.6.3和节点-12.18.2

npm WARN registry Unexpected warning for http://registry.npmjs.org/: Miscellaneous Warning ERR_SOCKET_TIMEOUT: request to http://registry.npmjs.org/universalify failed, reason: Socket timeout
npm WARN registry Using stale data from http://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code FETCH_ERROR
npm ERR! errno FETCH_ERROR
npm ERR! invalid json response body at http://registry.npmjs.org/graceful-fs reason: Unexpected end of JSON input
npm ERR! A complete log of this run can be found in:
npm ERR!     C:UsersHabibAppDataLocalnpm-cache_logs2021-03-19T15_51_48_201Z-debug.log

我尝试过的:

我也尝试了这个流行的解决方案,我在网上找到了npm cache clean --force,我得到了这个作为输出:

npm WARN using --force Recommended protections disabled.

我不确定是否与它显示的输出一起工作。

我去了C:\Users\Habib\AppData\Roaming\npm目录,手动删除node_modules文件夹和一些与创建反应应用程序相关的文件,然后我尝试了npm cache clean --force,它成功地给出了消息npm WARN using --force I sure hope you know what you are doing.

然后我运行命令npm install -g create-react-app,我认为它成功地给出了响应:

C:UsersHabibAppDataRoamingnpmcreate-react-app -> C:UsersHabibAppDataRoamingnpmnode_modulescreate-react-appindex.js
+ create-react-app@4.0.3
added 67 packages from 25 contributors in 51.721s

然后我尝试了npx create-react-app tutorial1,但它给出了以下错误:

Creating a new React app in C:UsersHabibDocumentsreactTUTORIAL-CODEStutorial1.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
npm ERR! Unexpected end of JSON input while parsing near '..."2.16.1-alpha.1+47266'
npm ERR! A complete log of this run can be found in:
npm ERR!     C:UsersHabibAppDataRoamingnpm-cache_logs2021-03-19T17_10_20_762Z-debug.log
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.
Deleting generated file... package.json
Deleting tutorial1/ from C:UsersHabibDocumentsreactTUTORIAL-CODES
Done

C: \Users\Habib\AppData\Roaming\npm-cache_logs\2021-03-19T17_10_20_762Z-debug.log文件

> 0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\Program Files\nodejs\node.exe',
1 verbose cli   'C:\Program Files\nodejs\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',
1 verbose cli   'cra-template'
1 verbose cli ]
2 info using npm@6.14.5
3 info using node@v12.18.2
4 verbose npm-session 68ab21e2cf2695a9
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 200 http://registry.npmjs.org/cra-template 2446ms
8 http fetch GET 200 http://registry.npmjs.org/cra-template/-/cra-template-1.1.2.tgz 1113ms
9 silly pacote tag manifest for cra-template@latest fetched in 3636ms
10 http fetch GET 200 http://registry.npmjs.org/react-scripts 5611ms
11 http fetch GET 200 http://registry.npmjs.org/react-dom 5708ms
12 http fetch GET 200 http://registry.npmjs.org/react 5747ms
13 http fetch GET 200 http://registry.npmjs.org/react-scripts/-/react-scripts-4.0.3.tgz 617ms
14 silly pacote tag manifest for react-scripts@latest fetched in 6309ms
15 http fetch GET 200 http://registry.npmjs.org/react/-/react-17.0.1.tgz 662ms
16 silly pacote tag manifest for react@latest fetched in 6794ms
17 http fetch GET 200 http://registry.npmjs.org/react-dom/-/react-dom-17.0.1.tgz 1719ms
18 silly pacote tag manifest for react-dom@latest fetched in 7517ms
19 timing stage:loadCurrentTree Completed in 8613ms
20 silly install loadIdealTree
21 silly install cloneCurrentTreeToIdealTree
22 timing stage:loadIdealTree:cloneCurrentTree Completed in 1ms
23 silly install loadShrinkwrap
24 timing stage:loadIdealTree:loadShrinkwrap Completed in 3ms
25 silly install loadAllDepsIntoIdealTree
26 silly resolveWithNewModule cra-template@1.1.2 checking installable status
27 silly resolveWithNewModule react-scripts@4.0.3 checking installable status
28 silly resolveWithNewModule react@17.0.1 checking installable status
29 silly resolveWithNewModule react-dom@17.0.1 checking installable status
30 http fetch GET 200 http://registry.npmjs.org/object-assign 452ms
31 http fetch GET 200 http://registry.npmjs.org/loose-envify 591ms
32 http fetch GET 200 http://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz 261ms
33 silly pacote range manifest for object-assign@^4.1.1 fetched in 771ms
34 silly resolveWithNewModule object-assign@4.1.1 checking installable status
35 http fetch GET 200 http://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz 490ms
36 silly pacote range manifest for loose-envify@^1.1.0 fetched in 1117ms
37 silly resolveWithNewModule loose-envify@1.4.0 checking installable status
38 http fetch GET 200 http://registry.npmjs.org/js-tokens 224ms
39 http fetch GET 200 http://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz 330ms
40 silly pacote range manifest for js-tokens@^3.0.0 || ^4.0.0 fetched in 588ms
41 silly resolveWithNewModule js-tokens@4.0.0 checking installable status
42 http fetch GET 200 http://registry.npmjs.org/scheduler 1252ms
43 http fetch GET 200 http://registry.npmjs.org/scheduler/-/scheduler-0.20.1.tgz 337ms
44 silly pacote range manifest for scheduler@^0.20.1 fetched in 1646ms
45 silly resolveWithNewModule scheduler@0.20.1 checking installable status
46 http fetch GET 200 http://registry.npmjs.org/@svgr%2fwebpack 7303ms
47 http fetch GET 200 http://registry.npmjs.org/@babel%2fcore 7340ms
48 http fetch GET 200 http://registry.npmjs.org/@pmmmwh%2freact-refresh-webpack-plugin 7524ms
49 http fetch GET 200 http://registry.npmjs.org/babel-eslint 8276ms
50 http fetch GET 200 http://registry.npmjs.org/babel-plugin-named-asset-import 9485ms
51 http fetch GET 200 http://registry.npmjs.org/@svgr/webpack/-/webpack-5.5.0.tgz 4177ms
52 silly pacote version manifest for @svgr/webpack@5.5.0 fetched in 11541ms
53 silly resolveWithNewModule @svgr/webpack@5.5.0 checking installable status
54 http fetch GET 200 http://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz 5502ms
55 http fetch GET 200 http://registry.npmjs.org/babel-jest 13810ms
56 silly pacote range manifest for babel-eslint@^10.1.0 fetched in 13876ms
57 warn deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
58 silly resolveWithNewModule babel-eslint@10.1.0 checking installable status
59 http fetch GET 200 http://registry.npmjs.org/babel-loader 15188ms
60 http fetch GET 200 http://registry.npmjs.org/babel-plugin-named-asset-import/-/babel-plugin-named-asset-import-0.3.7.tgz 6380ms
61 silly pacote range manifest for babel-plugin-named-asset-import@^0.3.7 fetched in 16004ms
62 silly resolveWithNewModule babel-plugin-named-asset-import@0.3.7 checking installable status
63 http fetch GET 200 http://registry.npmjs.org/@babel/core/-/core-7.12.3.tgz 8711ms
64 silly pacote version manifest for @babel/core@7.12.3 fetched in 16115ms
65 silly resolveWithNewModule @babel/core@7.12.3 checking installable status
66 http fetch GET 200 http://registry.npmjs.org/babel-jest/-/babel-jest-26.6.3.tgz 5327ms
67 silly pacote range manifest for babel-jest@^26.6.0 fetched in 19201ms
68 silly resolveWithNewModule babel-jest@26.6.3 checking installable status
69 http fetch GET 200 http://registry.npmjs.org/case-sensitive-paths-webpack-plugin 4266ms
70 http fetch GET 200 http://registry.npmjs.org/camelcase 7529ms
71 http fetch GET 200 http://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.4.3.tgz 13889ms
72 silly pacote version manifest for @pmmmwh/react-refresh-webpack-plugin@0.4.3 fetched in 21464ms
73 silly resolveWithNewModule @pmmmwh/react-refresh-webpack-plugin@0.4.3 checking installable status
74 http fetch GET 200 http://registry.npmjs.org/babel-loader/-/babel-loader-8.1.0.tgz 7664ms
75 silly pacote version manifest for babel-loader@8.1.0 fetched in 22897ms
76 silly resolveWithNewModule babel-loader@8.1.0 checking installable status
77 http fetch GET 200 http://registry.npmjs.org/css-loader 7223ms
78 http fetch GET 200 http://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz 2201ms
79 http fetch GET 200 http://registry.npmjs.org/bfj 12081ms
80 silly pacote range manifest for camelcase@^6.1.0 fetched in 9771ms
81 silly resolveWithNewModule camelcase@6.2.0 checking installable status
82 http fetch GET 200 http://registry.npmjs.org/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.3.0.tgz 3452ms
83 silly pacote version manifest for case-sensitive-paths-webpack-plugin@2.3.0 fetched in 7765ms
84 silly resolveWithNewModule case-sensitive-paths-webpack-plugin@2.3.0 checking installable status
85 http fetch GET 200 http://registry.npmjs.org/dotenv 4717ms
86 http fetch GET 200 http://registry.npmjs.org/dotenv-expand 2637ms
87 http fetch GET 200 http://registry.npmjs.org/babel-preset-react-app 24671ms
88 http fetch GET 200 http://registry.npmjs.org/bfj/-/bfj-7.0.2.tgz 2963ms
89 silly pacote range manifest for bfj@^7.0.2 fetched in 15075ms
90 silly resolveWithNewModule bfj@7.0.2 checking installable status
91 http fetch GET 200 http://registry.npmjs.org/babel-preset-react-app/-/babel-preset-react-app-10.0.0.tgz 2218ms
92 silly pacote range manifest for babel-preset-react-app@^10.0.0 fetched in 26933ms
93 silly resolveWithNewModule babel-preset-react-app@10.0.0 checking installable status
94 http fetch GET 200 http://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz 3026ms
95 silly pacote version manifest for dotenv@8.2.0 fetched in 7776ms
96 silly resolveWithNewModule dotenv@8.2.0 checking installable status
97 http fetch GET 200 http://registry.npmjs.org/css-loader/-/css-loader-4.3.0.tgz 4236ms
98 http fetch GET 200 http://registry.npmjs.org/eslint-config-react-app 3939ms
99 silly pacote version manifest for css-loader@4.3.0 fetched in 11518ms
100 silly resolveWithNewModule css-loader@4.3.0 checking installable status
101 http fetch GET 200 http://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz 4543ms
102 silly pacote version manifest for dotenv-expand@5.1.0 fetched in 7206ms
103 silly resolveWithNewModule dotenv-expand@5.1.0 checking installable status
104 http fetch GET 200 http://registry.npmjs.org/@typescript-eslint%2feslint-plugin 29628ms
105 http fetch GET 200 http://registry.npmjs.org/eslint-config-react-app/-/eslint-config-react-app-6.0.0.tgz 2118ms
106 silly pacote range manifest for eslint-config-react-app@^6.0.0 fetched in 6092ms
107 silly resolveWithNewModule eslint-config-react-app@6.0.0 checking installable status
108 http fetch GET 200 http://registry.npmjs.org/eslint-plugin-import 3514ms
109 http fetch GET 200 http://registry.npmjs.org/eslint-plugin-react 2806ms
110 http fetch GET 200 http://registry.npmjs.org/eslint-plugin-jsx-a11y 3521ms
111 http fetch GET 200 http://registry.npmjs.org/eslint-plugin-flowtype 11930ms
112 http fetch GET 200 http://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.22.0.tgz 5899ms
113 silly pacote range manifest for eslint-plugin-react@^7.21.5 fetched in 8740ms
114 silly resolveWithNewModule eslint-plugin-react@7.22.0 checking installable status
115 http fetch GET 200 http://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.4.1.tgz 6202ms
116 silly pacote range manifest for eslint-plugin-jsx-a11y@^6.3.1 fetched in 9777ms
117 silly resolveWithNewModule eslint-plugin-jsx-a11y@6.4.1 checking installable status
118 http fetch GET 200 http://registry.npmjs.org/eslint-plugin-react-hooks 8773ms
119 http fetch GET 200 http://registry.npmjs.org/eslint 15013ms
120 http fetch GET 200 http://registry.npmjs.org/eslint-webpack-plugin 2073ms
121 http fetch GET 200 http://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-5.4.0.tgz 2716ms
122 silly pacote range manifest for eslint-plugin-flowtype@^5.2.0 fetched in 14697ms
123 silly resolveWithNewModule eslint-plugin-flowtype@5.4.0 checking installable status
124 http fetch GET 200 http://registry.npmjs.org/file-loader 2163ms
125 http fetch GET 200 http://registry.npmjs.org/eslint-plugin-testing-library 9190ms
126 http fetch GET 200 http://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.2.0.tgz 1530ms
127 silly pacote range manifest for eslint-plugin-react-hooks@^4.2.0 fetched in 10350ms
128 silly resolveWithNewModule eslint-plugin-react-hooks@4.2.0 checking installable status
129 http fetch GET 304 http://registry.npmjs.org/fs-extra 3502ms (from cache)
130 http fetch GET 200 http://registry.npmjs.org/eslint-webpack-plugin/-/eslint-webpack-plugin-2.5.2.tgz 4011ms
131 silly pacote range manifest for eslint-webpack-plugin@^2.5.2 fetched in 6120ms
132 silly resolveWithNewModule eslint-webpack-plugin@2.5.2 checking installable status
133 http fetch GET 200 http://registry.npmjs.org/file-loader/-/file-loader-6.1.1.tgz 3617ms
134 silly pacote version manifest for file-loader@6.1.1 fetched in 5818ms
135 silly resolveWithNewModule file-loader@6.1.1 checking installable status
136 http fetch GET 200 http://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.18.0.tgz 13254ms
137 silly pacote range manifest for @typescript-eslint/eslint-plugin@^4.5.0 fetched in 42994ms
138 silly resolveWithNewModule @typescript-eslint/eslint-plugin@4.18.0 checking installable status
139 http fetch GET 200 http://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz 13330ms
140 silly pacote range manifest for eslint-plugin-import@^2.22.1 fetched in 16880ms
141 silly resolveWithNewModule eslint-plugin-import@2.22.1 checking installable status
142 http fetch GET 200 http://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-3.10.1.tgz 4682ms
143 silly pacote range manifest for eslint-plugin-testing-library@^3.9.2 fetched in 13918ms
144 silly resolveWithNewModule eslint-plugin-testing-library@3.10.1 checking installable status
145 http fetch GET 200 http://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz 1763ms
146 silly pacote range manifest for fs-extra@^9.0.1 fetched in 5303ms
147 silly resolveWithNewModule fs-extra@9.1.0 checking installable status
148 http fetch GET 200 http://registry.npmjs.org/identity-obj-proxy 1473ms
149 http fetch GET 200 http://registry.npmjs.org/html-webpack-plugin 5478ms
150 http fetch GET 200 http://registry.npmjs.org/eslint/-/eslint-7.22.0.tgz 7737ms
151 silly pacote range manifest for eslint@^7.11.0 fetched in 22819ms
152 silly resolveWithNewModule eslint@7.22.0 checking installable status
153 http fetch GET 200 http://registry.npmjs.org/identity-obj-proxy/-/identity-obj-proxy-3.0.0.tgz 1983ms
154 http fetch GET 200 http://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-4.5.0.tgz 1441ms
155 silly pacote version manifest for identity-obj-proxy@3.0.0 fetched in 3504ms
156 silly resolveWithNewModule identity-obj-proxy@3.0.0 checking installable status
157 silly pacote version manifest for html-webpack-plugin@4.5.0 fetched in 6987ms
158 silly resolveWithNewModule html-webpack-plugin@4.5.0 checking installable status
159 http fetch GET 200 http://registry.npmjs.org/jest-resolve 2676ms
160 http fetch GET 200 http://registry.npmjs.org/jest 3818ms
161 http fetch GET 200 http://registry.npmjs.org/jest-watch-typeahead 2750ms
162 http fetch GET 200 http://registry.npmjs.org/mini-css-extract-plugin 2682ms
163 http fetch GET 200 http://registry.npmjs.org/optimize-css-assets-webpack-plugin 1053ms
164 http fetch GET 200 http://registry.npmjs.org/jest-circus 3875ms
165 http fetch GET 200 http://registry.npmjs.org/pnp-webpack-plugin 987ms
166 http fetch GET 200 http://registry.npmjs.org/postcss-flexbugs-fixes 1033ms
167 http fetch GET 200 http://registry.npmjs.org/jest-resolve/-/jest-resolve-26.6.0.tgz 931ms
168 http fetch GET 200 http://registry.npmjs.org/jest-watch-typeahead/-/jest-watch-typeahead-0.6.1.tgz 695ms
169 http fetch GET 200 http://registry.npmjs.org/jest/-/jest-26.6.0.tgz 704ms
170 http fetch GET 200 http://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.11.3.tgz 682ms
171 http fetch GET 200 http://registry.npmjs.org/jest-circus/-/jest-circus-26.6.0.tgz 301ms
172 http fetch GET 200 http://registry.npmjs.org/optimize-css-assets-webpack-plugin/-/optimize-css-assets-webpack-plugin-5.0.4.tgz 404ms
173 silly pacote version manifest for jest-resolve@26.6.0 fetched in 3707ms
174 silly resolveWithNewModule jest-resolve@26.6.0 checking installable status
175 silly pacote version manifest for jest-watch-typeahead@0.6.1 fetched in 3579ms
176 silly resolveWithNewModule jest-watch-typeahead@0.6.1 checking installable status
177 silly pacote version manifest for jest@26.6.0 fetched in 4660ms
178 silly resolveWithNewModule jest@26.6.0 checking installable status
179 http fetch GET 200 http://registry.npmjs.org/pnp-webpack-plugin/-/pnp-webpack-plugin-1.6.4.tgz 243ms
180 silly pacote version manifest for mini-css-extract-plugin@0.11.3 fetched in 3497ms
181 silly resolveWithNewModule mini-css-extract-plugin@0.11.3 checking installable status
182 silly pacote version manifest for optimize-css-assets-webpack-plugin@5.0.4 fetched in 1584ms
183 silly resolveWithNewModule optimize-css-assets-webpack-plugin@5.0.4 checking installable status
184 silly pacote version manifest for jest-circus@26.6.0 fetched in 4329ms
185 silly resolveWithNewModule jest-circus@26.6.0 checking installable status
186 http fetch GET 200 http://registry.npmjs.org/postcss-flexbugs-fixes/-/postcss-flexbugs-fixes-4.2.1.tgz 290ms
187 silly pacote version manifest for pnp-webpack-plugin@1.6.4 fetched in 1356ms
188 silly resolveWithNewModule pnp-webpack-plugin@1.6.4 checking installable status
189 silly pacote version manifest for postcss-flexbugs-fixes@4.2.1 fetched in 1369ms
190 silly resolveWithNewModule postcss-flexbugs-fixes@4.2.1 checking installable status
191 http fetch GET 200 http://registry.npmjs.org/postcss-loader 570ms
192 http fetch GET 200 http://registry.npmjs.org/postcss-normalize 612ms
193 http fetch GET 200 http://registry.npmjs.org/react-app-polyfill 604ms
194 http fetch GET 200 http://registry.npmjs.org/postcss-safe-parser 663ms
195 http fetch GET 200 http://registry.npmjs.org/postcss-preset-env 785ms
196 http fetch GET 304 http://registry.npmjs.org/prompts 831ms (from cache)
225 silly pacote version manifest for resolve@1.18.1 fetched in 1089ms
226 silly resolveWithNewModule resolve@1.18.1 checking installable status
227 http fetch GET 304 http://registry.npmjs.org/semver 435ms (from cache)
228 http fetch GET 200 http://registry.npmjs.org/style-loader 384ms
229 silly pacote version manifest for semver@7.3.2 fetched in 480ms
230 silly resolveWithNewModule semver@7.3.2 checking installable status
231 http fetch GET 200 http://registry.npmjs.org/ts-pnp 339ms
232 http fetch GET 200 http://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-3.1.2.tgz 362ms
233 silly pacote range manifest for resolve-url-loader@^3.1.2 fetched in 630ms
234 silly resolveWithNewModule resolve-url-loader@3.1.2 checking installable status
235 http fetch GET 200 http://registry.npmjs.org/url-loader 491ms
236 http fetch GET 200 http://registry.npmjs.org/terser-webpack-plugin 815ms
237 http fetch GET 200 http://registry.npmjs.org/eslint-plugin-jest 22902ms
238 http fetch GET 200 http://registry.npmjs.org/sass-loader 1144ms
239 http fetch GET 200 http://registry.npmjs.org/ts-pnp/-/ts-pnp-1.2.0.tgz 854ms
240 silly pacote version manifest for ts-pnp@1.2.0 fetched in 1221ms
241 silly resolveWithNewModule ts-pnp@1.2.0 checking installable status
242 http fetch GET 200 http://registry.npmjs.org/style-loader/-/style-loader-1.3.0.tgz 1025ms
243 silly pacote version manifest for style-loader@1.3.0 fetched in 1454ms
244 silly resolveWithNewModule style-loader@1.3.0 checking installable status
245 http fetch GET 200 http://registry.npmjs.org/webpack-manifest-plugin 1099ms
246 http fetch GET 200 http://registry.npmjs.org/webpack-dev-server 1588ms
247 http fetch GET 200 http://registry.npmjs.org/sass-loader/-/sass-loader-10.1.1.tgz 965ms
248 silly pacote range manifest for sass-loader@^10.0.5 fetched in 2158ms
249 silly resolveWithNewModule sass-loader@10.1.1 checking installable status
250 http fetch GET 200 http://registry.npmjs.org/url-loader/-/url-loader-4.1.1.tgz 1605ms
251 silly pacote version manifest for url-loader@4.1.1 fetched in 2122ms
252 silly resolveWithNewModule url-loader@4.1.1 checking installable status
253 http fetch GET 200 http://registry.npmjs.org/webpack-manifest-plugin/-/webpack-manifest-plugin-2.2.0.tgz 705ms
254 silly pacote version manifest for webpack-manifest-plugin@2.2.0 fetched in 1830ms
255 silly resolveWithNewModule webpack-manifest-plugin@2.2.0 checking installable status
256 http fetch GET 200 http://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-4.2.3.tgz 1576ms
257 silly pacote version manifest for terser-webpack-plugin@4.2.3 fetched in 2429ms
258 silly resolveWithNewModule terser-webpack-plugin@4.2.3 checking installable status
259 http fetch GET 200 http://registry.npmjs.org/workbox-webpack-plugin 1724ms
260 http fetch GET 200 http://registry.npmjs.org/fsevents 2467ms
261 http fetch GET 200 http://registry.npmjs.org/workbox-webpack-plugin/-/workbox-webpack-plugin-5.1.4.tgz 977ms
262 silly pacote version manifest for workbox-webpack-plugin@5.1.4 fetched in 2742ms
263 silly resolveWithNewModule workbox-webpack-plugin@5.1.4 checking installable status
264 http fetch GET 200 http://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.11.1.tgz 2037ms
265 silly pacote version manifest for webpack-dev-server@3.11.1 fetched in 3669ms
266 silly resolveWithNewModule webpack-dev-server@3.11.1 checking installable status
267 http fetch GET 200 http://registry.npmjs.org/webpack 3829ms
268 http fetch GET 200 http://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz 305ms
269 silly pacote range manifest for fsevents@^2.1.3 fetched in 2808ms
270 silly resolveWithNewModule fsevents@2.3.2 checking installable status
271 http fetch GET 200 http://registry.npmjs.org/webpack/-/webpack-4.44.2.tgz 965ms
272 silly pacote version manifest for webpack@4.44.2 fetched in 4905ms
273 silly resolveWithNewModule webpack@4.44.2 checking installable status
274 http fetch GET 200 http://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-24.3.2.tgz 4555ms
275 silly pacote range manifest for eslint-plugin-jest@^24.1.0 fetched in 27511ms
276 silly resolveWithNewModule eslint-plugin-jest@24.3.2 checking installable status
277 http fetch GET 200 http://registry.npmjs.org/@typescript-eslint%2fparser 190352ms
278 silly fetchPackageMetaData error for @typescript-eslint/parser@^4.5.0 Unexpected end of JSON input while parsing near '..."2.16.1-alpha.1+47266'
279 timing stage:rollbackFailedOptional Completed in 5ms
280 timing stage:runTopLevelLifecycles Completed in 202553ms
281 silly saveTree tutorial1@0.1.0
281 silly saveTree +-- cra-template@1.1.2
281 silly saveTree +-- react-dom@17.0.1
281 silly saveTree | +-- loose-envify@1.4.0
281 silly saveTree | | `-- js-tokens@4.0.0
281 silly saveTree | +-- object-assign@4.1.1
281 silly saveTree | `-- scheduler@0.20.1
281 silly saveTree +-- react-scripts@4.0.3
281 silly saveTree | +-- @babel/core@7.12.3
281 silly saveTree | | `-- resolve@1.18.1
281 silly saveTree | +-- @pmmmwh/react-refresh-webpack-plugin@0.4.3
281 silly saveTree | +-- @svgr/webpack@5.5.0
281 silly saveTree | +-- @typescript-eslint/eslint-plugin@4.18.0
281 silly saveTree | | `-- semver@7.3.2
281 silly saveTree | +-- babel-eslint@10.1.0
281 silly saveTree | +-- babel-jest@26.6.3
281 silly saveTree | +-- babel-loader@8.1.0
281 silly saveTree | +-- babel-plugin-named-asset-import@0.3.7
281 silly saveTree | +-- babel-preset-react-app@10.0.0
281 silly saveTree | +-- bfj@7.0.2
281 silly saveTree | +-- camelcase@6.2.0
281 silly saveTree | +-- case-sensitive-paths-webpack-plugin@2.3.0
281 silly saveTree | +-- css-loader@4.3.0
281 silly saveTree | +-- dotenv-expand@5.1.0
281 silly saveTree | +-- dotenv@8.2.0
281 silly saveTree | +-- eslint-config-react-app@6.0.0
281 silly saveTree | +-- eslint-plugin-flowtype@5.4.0
281 silly saveTree | +-- eslint-plugin-import@2.22.1
281 silly saveTree | +-- eslint-plugin-jest@24.3.2
281 silly saveTree | +-- eslint-plugin-jsx-a11y@6.4.1
281 silly saveTree | +-- eslint-plugin-react-hooks@4.2.0
281 silly saveTree | +-- eslint-plugin-react@7.22.0
281 silly saveTree | +-- eslint-plugin-testing-library@3.10.1
281 silly saveTree | +-- eslint-webpack-plugin@2.5.2
281 silly saveTree | +-- eslint@7.22.0
281 silly saveTree | +-- file-loader@6.1.1
281 silly saveTree | +-- fs-extra@9.1.0
281 silly saveTree | +-- fsevents@2.3.2
281 silly saveTree | +-- html-webpack-plugin@4.5.0
281 silly saveTree | +-- identity-obj-proxy@3.0.0
281 silly saveTree | +-- jest-circus@26.6.0
281 silly saveTree | +-- jest-resolve@26.6.0
281 silly saveTree | +-- jest-watch-typeahead@0.6.1
281 silly saveTree | +-- jest@26.6.0
281 silly saveTree | +-- mini-css-extract-plugin@0.11.3
281 silly saveTree | +-- optimize-css-assets-webpack-plugin@5.0.4
281 silly saveTree | +-- pnp-webpack-plugin@1.6.4
281 silly saveTree | | `-- ts-pnp@1.2.0
281 silly saveTree | +-- postcss-flexbugs-fixes@4.2.1
281 silly saveTree | +-- postcss-loader@3.0.0
281 silly saveTree | +-- postcss-normalize@8.0.1
281 silly saveTree | +-- postcss-preset-env@6.7.0
281 silly saveTree | +-- postcss-safe-parser@5.0.2
281 silly saveTree | +-- prompts@2.4.0
281 silly saveTree | +-- react-app-polyfill@2.0.0
281 silly saveTree | +-- react-dev-utils@11.0.4
281 silly saveTree | +-- react-refresh@0.8.3
281 silly saveTree | +-- resolve-url-loader@3.1.2
281 silly saveTree | +-- resolve@1.18.1
281 silly saveTree | +-- sass-loader@10.1.1
281 silly saveTree | +-- semver@7.3.2
281 silly saveTree | +-- style-loader@1.3.0
281 silly saveTree | +-- terser-webpack-plugin@4.2.3
281 silly saveTree | +-- ts-pnp@1.2.0
281 silly saveTree | +-- url-loader@4.1.1
281 silly saveTree | +-- webpack-dev-server@3.11.1
281 silly saveTree | +-- webpack-manifest-plugin@2.2.0
281 silly saveTree | +-- webpack@4.44.2
281 silly saveTree | `-- workbox-webpack-plugin@5.1.4
281 silly saveTree `-- react@17.0.1
282 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^2.1.3 (node_modulesreact-scriptsnode_modulesfsevents):
283 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
284 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS:    darwin
284 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch:  any
284 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS:   win32
284 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
285 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '..."2.16.1-alpha.1+47266'
285 verbose stack     at JSON.parse (<anonymous>)
285 verbose stack     at parseJson (C:Program Filesnodejsnode_modulesnpmnode_modulesjson-parse-better-errorsindex.js:7:17)
285 verbose stack     at C:Program Filesnodejsnode_modulesnpmnode_modulesnode-fetch-npmsrcbody.js:96:50
285 verbose stack     at runMicrotasks (<anonymous>)
285 verbose stack     at processTicksAndRejections (internal/process/task_queues.js:97:5)
286 verbose cwd C:UsersHabibDocumentsreactTUTORIAL-CODEStutorial1
287 verbose Windows_NT 10.0.17763
288 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "--save" "--save-exact" "--loglevel" "error" "react" "react-dom" "react-scripts" "cra-template"
289 verbose node v12.18.2
290 verbose npm  v6.14.5
291 error Unexpected end of JSON input while parsing near '..."2.16.1-alpha.1+47266'
292 verbose exit [ 1, true ]```

尝试npm cache clean --force

然后npx create-react-app app-name

相关内容

最新更新