Reactjs npm错误!401:@babel/core@7.1.0使用创建新应用程序时

Reactjs npm错误!401:@babel/core@7.1.0使用创建新应用程序时,reactjs,npm,create-react-app,Reactjs,Npm,Create React App,我正在尝试使用创建一个新的react应用程序 create-react-app my-app 但我得到了这个错误。我以前使用过CreateReact应用程序,这是我第一次遇到这种情况 Creating a new React app in C:\Users\jason\Desktop\my-app. Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-

我正在尝试使用创建一个新的react应用程序

create-react-app my-app
但我得到了这个错误。我以前使用过CreateReact应用程序,这是我第一次遇到这种情况

Creating a new React app in C:\Users\jason\Desktop\my-app.

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

npm ERR! code E401
npm ERR! 401 Unauthorized: @babel/core@7.1.0

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\jason\AppData\Roaming\npm-cache\_logs\2018-11-28T04_38_50_180Z-debug.log

Aborting installation.
  npm install --save --save-exact --loglevel error react react-dom react-scripts 
has failed.

Deleting generated file... package.json
Deleting my-app/ from C:\Users\jason\Desktop
Done.
这是我得到的错误日志

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\jason\\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 npm@6.4.1
3 info using node@v10.14.0
4 verbose npm-session 704953b6b7cc6fbe
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 304 https://registry.npmjs.org/react-dom 612ms (from cache)
8 silly pacote tag manifest for react-dom@latest fetched in 618ms
9 http fetch GET 304 https://registry.npmjs.org/react-scripts 619ms (from cache)
10 silly pacote tag manifest for react-scripts@latest fetched in 624ms
11 http fetch GET 304 https://registry.npmjs.org/react 635ms (from cache)
12 silly pacote tag manifest for react@latest fetched in 653ms
13 timing stage:loadCurrentTree Completed in 899ms
14 silly install loadIdealTree
15 silly install cloneCurrentTreeToIdealTree
16 timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms
17 silly install loadShrinkwrap
18 timing stage:loadIdealTree:loadShrinkwrap Completed in 1ms
19 silly install loadAllDepsIntoIdealTree
20 silly resolveWithNewModule react-dom@16.6.3 checking installable status
21 silly resolveWithNewModule react-scripts@2.1.1 checking installable status
22 silly resolveWithNewModule react@16.6.3 checking installable status
23 http fetch GET 304 https://registry.npmjs.org/scheduler 118ms (from cache)
24 silly pacote range manifest for scheduler@^0.11.2 fetched in 119ms
25 silly resolveWithNewModule scheduler@0.11.2 checking installable status
26 http fetch GET 304 https://registry.npmjs.org/object-assign 125ms (from cache)
27 silly pacote range manifest for object-assign@^4.1.1 fetched in 127ms
28 silly resolveWithNewModule object-assign@4.1.1 checking installable status
29 http fetch GET 304 https://registry.npmjs.org/loose-envify 140ms (from cache)
30 silly pacote range manifest for loose-envify@^1.1.0 fetched in 143ms
31 silly resolveWithNewModule loose-envify@1.4.0 checking installable status
32 http fetch GET 304 https://registry.npmjs.org/prop-types 375ms (from cache)
33 silly pacote range manifest for prop-types@^15.6.2 fetched in 380ms
34 silly resolveWithNewModule prop-types@15.6.2 checking installable status
35 http fetch GET 304 https://registry.npmjs.org/js-tokens 126ms (from cache)
36 silly pacote range manifest for js-tokens@^3.0.0 || ^4.0.0 fetched in 132ms
37 silly resolveWithNewModule js-tokens@4.0.0 checking installable status
38 http fetch GET 401 https://registry.npmjs.org/@babel%2fcore 114ms
39 silly fetchPackageMetaData error for @babel/core@7.1.0 401 Unauthorized: @babel/core@7.1.0
40 http fetch GET 401 https://registry.npmjs.org/@svgr%2fwebpack 125ms
41 silly fetchPackageMetaData error for @svgr/webpack@2.4.1 401 Unauthorized: @svgr/webpack@2.4.1
42 http fetch GET 304 https://registry.npmjs.org/bfj 131ms (from cache)
43 silly pacote version manifest for bfj@6.1.1 fetched in 135ms
44 silly resolveWithNewModule bfj@6.1.1 checking installable status
45 http fetch GET 304 https://registry.npmjs.org/babel-plugin-named-asset-import 137ms (from cache)
46 silly pacote range manifest for babel-plugin-named-asset-import@^0.2.3 fetched in 142ms
47 silly resolveWithNewModule babel-plugin-named-asset-import@0.2.3 checking installable status
48 http fetch GET 304 https://registry.npmjs.org/chalk 138ms (from cache)
49 silly pacote version manifest for chalk@2.4.1 fetched in 140ms
50 silly resolveWithNewModule chalk@2.4.1 checking installable status
51 http fetch GET 304 https://registry.npmjs.org/css-loader 133ms (from cache)
52 silly pacote version manifest for css-loader@1.0.0 fetched in 138ms
53 silly resolveWithNewModule css-loader@1.0.0 checking installable status
54 http fetch GET 304 https://registry.npmjs.org/dotenv 141ms (from cache)
55 silly pacote version manifest for dotenv@6.0.0 fetched in 143ms
56 silly resolveWithNewModule dotenv@6.0.0 checking installable status
57 http fetch GET 304 https://registry.npmjs.org/dotenv-expand 143ms (from cache)
58 silly pacote version manifest for dotenv-expand@4.2.0 fetched in 144ms
59 silly resolveWithNewModule dotenv-expand@4.2.0 checking installable status
60 http fetch GET 304 https://registry.npmjs.org/babel-preset-react-app 357ms (from cache)
61 silly pacote range manifest for babel-preset-react-app@^6.1.0 fetched in 359ms
62 silly resolveWithNewModule babel-preset-react-app@6.1.0 checking installable status
63 http fetch GET 304 https://registry.npmjs.org/babel-loader 392ms (from cache)
64 silly pacote version manifest for babel-loader@8.0.4 fetched in 399ms
65 silly resolveWithNewModule babel-loader@8.0.4 checking installable status
66 http fetch GET 304 https://registry.npmjs.org/case-sensitive-paths-webpack-plugin 411ms (from cache)
67 silly pacote version manifest for case-sensitive-paths-webpack-plugin@2.1.2 fetched in 421ms
68 silly resolveWithNewModule case-sensitive-paths-webpack-plugin@2.1.2 checking installable status
69 http fetch GET 304 https://registry.npmjs.org/babel-eslint 433ms (from cache)
70 http fetch GET 304 https://registry.npmjs.org/eslint-config-react-app 170ms (from cache)
71 silly pacote version manifest for babel-eslint@9.0.0 fetched in 442ms
72 silly resolveWithNewModule babel-eslint@9.0.0 checking installable status
73 silly pacote range manifest for eslint-config-react-app@^3.0.5 fetched in 178ms
74 silly resolveWithNewModule eslint-config-react-app@3.0.5 checking installable status
75 http fetch GET 304 https://registry.npmjs.org/eslint-loader 165ms (from cache)
76 silly pacote version manifest for eslint-loader@2.1.1 fetched in 171ms
77 silly resolveWithNewModule eslint-loader@2.1.1 checking installable status
78 http fetch GET 304 https://registry.npmjs.org/babel-jest 456ms (from cache)
79 silly pacote version manifest for babel-jest@23.6.0 fetched in 463ms
80 silly resolveWithNewModule babel-jest@23.6.0 checking installable status
81 http fetch GET 304 https://registry.npmjs.org/eslint-plugin-flowtype 186ms (from cache)
82 silly pacote version manifest for eslint-plugin-flowtype@2.50.1 fetched in 197ms
83 silly resolveWithNewModule eslint-plugin-flowtype@2.50.1 checking installable status
84 http fetch GET 304 https://registry.npmjs.org/eslint 234ms (from cache)
85 http fetch GET 304 https://registry.npmjs.org/babel-core 495ms (from cache)
86 silly pacote version manifest for eslint@5.6.0 fetched in 249ms
87 silly resolveWithNewModule eslint@5.6.0 checking installable status
88 silly pacote version manifest for babel-core@7.0.0-bridge.0 fetched in 506ms
89 silly resolveWithNewModule babel-core@7.0.0-bridge.0 checking installable status
90 http fetch GET 304 https://registry.npmjs.org/eslint-plugin-import 161ms (from cache)
91 silly pacote version manifest for eslint-plugin-import@2.14.0 fetched in 165ms
92 silly resolveWithNewModule eslint-plugin-import@2.14.0 checking installable status
93 http fetch GET 304 https://registry.npmjs.org/eslint-plugin-jsx-a11y 135ms (from cache)
94 silly pacote version manifest for eslint-plugin-jsx-a11y@6.1.2 fetched in 140ms
95 silly resolveWithNewModule eslint-plugin-jsx-a11y@6.1.2 checking installable status
96 http fetch GET 304 https://registry.npmjs.org/fork-ts-checker-webpack-plugin-alt 116ms (from cache)
97 silly pacote version manifest for fork-ts-checker-webpack-plugin-alt@0.4.14 fetched in 119ms
98 silly resolveWithNewModule fork-ts-checker-webpack-plugin-alt@0.4.14 checking installable status
99 http fetch GET 304 https://registry.npmjs.org/eslint-plugin-react 154ms (from cache)
100 silly pacote version manifest for eslint-plugin-react@7.11.1 fetched in 157ms
101 silly resolveWithNewModule eslint-plugin-react@7.11.1 checking installable status
102 http fetch GET 304 https://registry.npmjs.org/fs-extra 135ms (from cache)
103 silly pacote version manifest for fs-extra@7.0.0 fetched in 137ms
104 silly resolveWithNewModule fs-extra@7.0.0 checking installable status
105 http fetch GET 304 https://registry.npmjs.org/file-loader 150ms (from cache)
106 silly pacote version manifest for file-loader@2.0.0 fetched in 153ms
107 silly resolveWithNewModule file-loader@2.0.0 checking installable status
108 http fetch GET 304 https://registry.npmjs.org/html-webpack-plugin 146ms (from cache)
109 silly pacote version manifest for html-webpack-plugin@4.0.0-alpha.2 fetched in 155ms
110 silly resolveWithNewModule html-webpack-plugin@4.0.0-alpha.2 checking installable status
111 http fetch GET 304 https://registry.npmjs.org/identity-obj-proxy 143ms (from cache)
112 silly pacote version manifest for identity-obj-proxy@3.0.0 fetched in 144ms
113 silly resolveWithNewModule identity-obj-proxy@3.0.0 checking installable status
114 http fetch GET 304 https://registry.npmjs.org/jest-pnp-resolver 131ms (from cache)
115 silly pacote version manifest for jest-pnp-resolver@1.0.1 fetched in 132ms
116 silly resolveWithNewModule jest-pnp-resolver@1.0.1 checking installable status
117 http fetch GET 304 https://registry.npmjs.org/mini-css-extract-plugin 119ms (from cache)
118 http fetch GET 304 https://registry.npmjs.org/jest-resolve 136ms (from cache)
119 silly pacote version manifest for mini-css-extract-plugin@0.4.3 fetched in 123ms
120 silly resolveWithNewModule mini-css-extract-plugin@0.4.3 checking installable status
121 http fetch GET 304 https://registry.npmjs.org/jest 162ms (from cache)
122 silly pacote version manifest for jest-resolve@23.6.0 fetched in 143ms
123 silly resolveWithNewModule jest-resolve@23.6.0 checking installable status
124 silly pacote version manifest for jest@23.6.0 fetched in 168ms
125 silly resolveWithNewModule jest@23.6.0 checking installable status
126 http fetch GET 304 https://registry.npmjs.org/optimize-css-assets-webpack-plugin 133ms (from cache)
127 silly pacote version manifest for optimize-css-assets-webpack-plugin@5.0.1 fetched in 134ms
128 silly resolveWithNewModule optimize-css-assets-webpack-plugin@5.0.1 checking installable status
129 http fetch GET 304 https://registry.npmjs.org/pnp-webpack-plugin 123ms (from cache)
130 silly pacote version manifest for pnp-webpack-plugin@1.1.0 fetched in 126ms
131 silly resolveWithNewModule pnp-webpack-plugin@1.1.0 checking installable status
132 http fetch GET 304 https://registry.npmjs.org/postcss-flexbugs-fixes 139ms (from cache)
133 silly pacote version manifest for postcss-flexbugs-fixes@4.1.0 fetched in 141ms
134 silly resolveWithNewModule postcss-flexbugs-fixes@4.1.0 checking installable status
135 http fetch GET 304 https://registry.npmjs.org/postcss-loader 137ms (from cache)
136 silly pacote version manifest for postcss-loader@3.0.0 fetched in 139ms
137 silly resolveWithNewModule postcss-loader@3.0.0 checking installable status
138 http fetch GET 304 https://registry.npmjs.org/postcss-safe-parser 119ms (from cache)
139 silly pacote version manifest for postcss-safe-parser@4.0.1 fetched in 125ms
140 silly resolveWithNewModule postcss-safe-parser@4.0.1 checking installable status
141 http fetch GET 304 https://registry.npmjs.org/react-app-polyfill 132ms (from cache)
142 silly pacote range manifest for react-app-polyfill@^0.1.3 fetched in 133ms
143 silly resolveWithNewModule react-app-polyfill@0.1.3 checking installable status
144 http fetch GET 304 https://registry.npmjs.org/postcss-preset-env 154ms (from cache)
145 silly pacote version manifest for postcss-preset-env@6.0.6 fetched in 160ms
146 silly resolveWithNewModule postcss-preset-env@6.0.6 checking installable status
147 http fetch GET 304 https://registry.npmjs.org/sass-loader 123ms (from cache)
148 silly pacote version manifest for sass-loader@7.1.0 fetched in 124ms
149 silly resolveWithNewModule sass-loader@7.1.0 checking installable status
150 http fetch GET 304 https://registry.npmjs.org/resolve 154ms (from cache)
151 http fetch GET 304 https://registry.npmjs.org/style-loader 127ms (from cache)
152 silly pacote version manifest for resolve@1.8.1 fetched in 156ms
153 silly resolveWithNewModule resolve@1.8.1 checking installable status
154 http fetch GET 304 https://registry.npmjs.org/react-dev-utils 162ms (from cache)
155 silly pacote version manifest for style-loader@0.23.0 fetched in 131ms
156 silly resolveWithNewModule style-loader@0.23.0 checking installable status
157 silly pacote range manifest for react-dev-utils@^6.1.1 fetched in 175ms
158 silly resolveWithNewModule react-dev-utils@6.1.1 checking installable status
159 http fetch GET 304 https://registry.npmjs.org/terser-webpack-plugin 146ms (from cache)
160 silly pacote version manifest for terser-webpack-plugin@1.1.0 fetched in 147ms
161 silly resolveWithNewModule terser-webpack-plugin@1.1.0 checking installable status
162 http fetch GET 304 https://registry.npmjs.org/url-loader 129ms (from cache)
163 silly pacote version manifest for url-loader@1.1.1 fetched in 130ms
164 silly resolveWithNewModule url-loader@1.1.1 checking installable status
165 http fetch GET 304 https://registry.npmjs.org/webpack-dev-server 140ms (from cache)
166 silly pacote version manifest for webpack-dev-server@3.1.9 fetched in 146ms
167 silly resolveWithNewModule webpack-dev-server@3.1.9 checking installable status
168 http fetch GET 304 https://registry.npmjs.org/webpack 178ms (from cache)
169 silly pacote version manifest for webpack@4.19.1 fetched in 192ms
170 silly resolveWithNewModule webpack@4.19.1 checking installable status
171 http fetch GET 304 https://registry.npmjs.org/webpack-manifest-plugin 155ms (from cache)
172 silly pacote version manifest for webpack-manifest-plugin@2.0.4 fetched in 158ms
173 silly resolveWithNewModule webpack-manifest-plugin@2.0.4 checking installable status
174 http fetch GET 304 https://registry.npmjs.org/fsevents 135ms (from cache)
175 silly pacote version manifest for fsevents@1.2.4 fetched in 141ms
176 silly resolveWithNewModule fsevents@1.2.4 checking installable status
177 silly tarball trying https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz by hash: sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==
178 http fetch GET 304 https://registry.npmjs.org/workbox-webpack-plugin 175ms (from cache)
179 silly pacote version manifest for workbox-webpack-plugin@3.6.3 fetched in 179ms
180 silly resolveWithNewModule workbox-webpack-plugin@3.6.3 checking installable status
181 silly extract https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz extracted to C:\Users\jason\AppData\Local\Temp\npm-27260-b11f4f05\unpack-82f3b5ae (516ms)
182 silly addBundled read tarball
183 silly cleanup remove extracted module
184 timing stage:rollbackFailedOptional Completed in 1ms
185 timing stage:runTopLevelLifecycles Completed in 3302ms
186 silly saveTree my-app@0.1.0
186 silly saveTree +-- react-dom@16.6.3
186 silly saveTree | +-- loose-envify@1.4.0
186 silly saveTree | | `-- js-tokens@4.0.0
186 silly saveTree | +-- object-assign@4.1.1
186 silly saveTree | +-- prop-types@15.6.2
186 silly saveTree | `-- scheduler@0.11.2
186 silly saveTree +-- react-scripts@2.1.1
186 silly saveTree | +-- babel-core@7.0.0-bridge.0
186 silly saveTree | +-- babel-eslint@9.0.0
186 silly saveTree | +-- babel-jest@23.6.0
186 silly saveTree | +-- babel-loader@8.0.4
186 silly saveTree | +-- babel-plugin-named-asset-import@0.2.3
186 silly saveTree | +-- babel-preset-react-app@6.1.0
186 silly saveTree | +-- bfj@6.1.1
186 silly saveTree | +-- case-sensitive-paths-webpack-plugin@2.1.2
186 silly saveTree | +-- chalk@2.4.1
186 silly saveTree | +-- css-loader@1.0.0
186 silly saveTree | +-- dotenv-expand@4.2.0
186 silly saveTree | +-- dotenv@6.0.0
186 silly saveTree | +-- eslint-config-react-app@3.0.5
186 silly saveTree | +-- eslint-loader@2.1.1
186 silly saveTree | +-- eslint-plugin-flowtype@2.50.1
186 silly saveTree | +-- eslint-plugin-import@2.14.0
186 silly saveTree | | `-- resolve@1.8.1
186 silly saveTree | +-- eslint-plugin-jsx-a11y@6.1.2
186 silly saveTree | +-- eslint-plugin-react@7.11.1
186 silly saveTree | +-- eslint@5.6.0
186 silly saveTree | +-- file-loader@2.0.0
186 silly saveTree | +-- fork-ts-checker-webpack-plugin-alt@0.4.14
186 silly saveTree | +-- fs-extra@7.0.0
186 silly saveTree | +-- fsevents@1.2.4
186 silly saveTree | | `-- node-pre-gyp@0.10.0
186 silly saveTree | |   +-- detect-libc@1.0.3
186 silly saveTree | |   +-- mkdirp@0.5.1
186 silly saveTree | |   | `-- minimist@0.0.8
186 silly saveTree | |   +-- needle@2.2.0
186 silly saveTree | |   | +-- debug@2.6.9
186 silly saveTree | |   | | `-- ms@2.0.0
186 silly saveTree | |   | +-- iconv-lite@0.4.21
186 silly saveTree | |   | | `-- safer-buffer@2.1.2
186 silly saveTree | |   | `-- sax@1.2.4
186 silly saveTree | |   +-- nopt@4.0.1
186 silly saveTree | |   | +-- abbrev@1.1.1
186 silly saveTree | |   | `-- osenv@0.1.5
186 silly saveTree | |   |   +-- os-homedir@1.0.2
186 silly saveTree | |   |   `-- os-tmpdir@1.0.2
186 silly saveTree | |   +-- npm-packlist@1.1.10
186 silly saveTree | |   | +-- ignore-walk@3.0.1
186 silly saveTree | |   | | `-- minimatch@3.0.4
186 silly saveTree | |   | |   `-- brace-expansion@1.1.11
186 silly saveTree | |   | |     +-- balanced-match@1.0.0
186 silly saveTree | |   | |     `-- concat-map@0.0.1
186 silly saveTree | |   | `-- npm-bundled@1.0.3
186 silly saveTree | |   +-- npmlog@4.1.2
186 silly saveTree | |   | +-- are-we-there-yet@1.1.4
186 silly saveTree | |   | | +-- delegates@1.0.0
186 silly saveTree | |   | | `-- readable-stream@2.3.6
186 silly saveTree | |   | |   +-- core-util-is@1.0.2
186 silly saveTree | |   | |   +-- inherits@2.0.3
186 silly saveTree | |   | |   +-- isarray@1.0.0
186 silly saveTree | |   | |   +-- process-nextick-args@2.0.0
186 silly saveTree | |   | |   +-- safe-buffer@5.1.1
186 silly saveTree | |   | |   +-- string_decoder@1.1.1
186 silly saveTree | |   | |   `-- util-deprecate@1.0.2
186 silly saveTree | |   | +-- console-control-strings@1.1.0
186 silly saveTree | |   | +-- gauge@2.7.4
186 silly saveTree | |   | | +-- aproba@1.2.0
186 silly saveTree | |   | | +-- has-unicode@2.0.1
186 silly saveTree | |   | | +-- object-assign@4.1.1
186 silly saveTree | |   | | +-- signal-exit@3.0.2
186 silly saveTree | |   | | +-- string-width@1.0.2
186 silly saveTree | |   | | | +-- code-point-at@1.1.0
186 silly saveTree | |   | | | +-- is-fullwidth-code-point@1.0.0
186 silly saveTree | |   | | | | `-- number-is-nan@1.0.1
186 silly saveTree | |   | | | `-- strip-ansi@3.0.1
186 silly saveTree | |   | | |   `-- ansi-regex@2.1.1
186 silly saveTree | |   | | +-- strip-ansi@3.0.1
186 silly saveTree | |   | | `-- wide-align@1.1.2
186 silly saveTree | |   | `-- set-blocking@2.0.0
186 silly saveTree | |   +-- rc@1.2.7
186 silly saveTree | |   | +-- deep-extend@0.5.1
186 silly saveTree | |   | +-- ini@1.3.5
186 silly saveTree | |   | +-- minimist@1.2.0
186 silly saveTree | |   | `-- strip-json-comments@2.0.1
186 silly saveTree | |   +-- rimraf@2.6.2
186 silly saveTree | |   | `-- glob@7.1.2
186 silly saveTree | |   |   +-- fs.realpath@1.0.0
186 silly saveTree | |   |   +-- inflight@1.0.6
186 silly saveTree | |   |   | +-- once@1.4.0
186 silly saveTree | |   |   | | `-- wrappy@1.0.2
186 silly saveTree | |   |   | `-- wrappy@1.0.2
186 silly saveTree | |   |   +-- once@1.4.0
186 silly saveTree | |   |   `-- path-is-absolute@1.0.1
186 silly saveTree | |   +-- semver@5.5.0
186 silly saveTree | |   `-- tar@4.4.1
186 silly saveTree | |     +-- chownr@1.0.1
186 silly saveTree | |     +-- fs-minipass@1.2.5
186 silly saveTree | |     | `-- minipass@2.2.4
186 silly saveTree | |     |   `-- yallist@3.0.2
186 silly saveTree | |     +-- minipass@2.2.4
186 silly saveTree | |     +-- minizlib@1.1.0
186 silly saveTree | |     `-- yallist@3.0.2
186 silly saveTree | +-- html-webpack-plugin@4.0.0-alpha.2
186 silly saveTree | +-- identity-obj-proxy@3.0.0
186 silly saveTree | +-- jest-pnp-resolver@1.0.1
186 silly saveTree | +-- jest-resolve@23.6.0
186 silly saveTree | +-- jest@23.6.0
186 silly saveTree | +-- mini-css-extract-plugin@0.4.3
186 silly saveTree | +-- optimize-css-assets-webpack-plugin@5.0.1
186 silly saveTree | +-- pnp-webpack-plugin@1.1.0
186 silly saveTree | +-- postcss-flexbugs-fixes@4.1.0
186 silly saveTree | +-- postcss-loader@3.0.0
186 silly saveTree | +-- postcss-preset-env@6.0.6
186 silly saveTree | +-- postcss-safe-parser@4.0.1
186 silly saveTree | +-- react-app-polyfill@0.1.3
186 silly saveTree | +-- react-dev-utils@6.1.1
186 silly saveTree | +-- resolve@1.8.1
186 silly saveTree | +-- sass-loader@7.1.0
186 silly saveTree | +-- style-loader@0.23.0
186 silly saveTree | +-- terser-webpack-plugin@1.1.0
186 silly saveTree | +-- url-loader@1.1.1
186 silly saveTree | +-- webpack-dev-server@3.1.9
186 silly saveTree | +-- webpack-manifest-plugin@2.0.4
186 silly saveTree | +-- webpack@4.19.1
186 silly saveTree | `-- workbox-webpack-plugin@3.6.3
186 silly saveTree `-- react@16.6.3
187 verbose stack Error: 401 Unauthorized: @babel/core@7.1.0
187 verbose stack     at fetch.then.res (C:\Users\jason\AppData\Roaming\npm\node_modules\npm\node_modules\pacote\lib\fetchers\registry\fetch.js:42:19)
187 verbose stack     at tryCatcher (C:\Users\jason\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
187 verbose stack     at Promise._settlePromiseFromHandler (C:\Users\jason\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:512:31)
187 verbose stack     at Promise._settlePromise (C:\Users\jason\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:569:18)
187 verbose stack     at Promise._settlePromise0 (C:\Users\jason\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:614:10)
187 verbose stack     at Promise._settlePromises (C:\Users\jason\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:693:18)
187 verbose stack     at Async._drainQueue (C:\Users\jason\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:133:16)
187 verbose stack     at Async._drainQueues (C:\Users\jason\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:143:10)
187 verbose stack     at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\jason\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:17:14)
187 verbose stack     at runCallback (timers.js:705:18)
187 verbose stack     at tryOnImmediate (timers.js:676:5)
187 verbose stack     at processImmediate (timers.js:658:5)
188 verbose cwd C:\Users\jason\Desktop\my-app
189 verbose Windows_NT 10.0.17134
190 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\jason\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save" "--save-exact" "--loglevel" "error" "react" "react-dom" "react-scripts"
191 verbose node v10.14.0
192 verbose npm  v6.4.1
193 error code E401
194 error 401 Unauthorized: @babel/core@7.1.0
195 verbose exit [ 1, true ]
我还尝试重新安装了我的节点js。目前它的版本是v10.14.0。我也尝试过删除并重新安装CreateReact软件包,但没有效果

我对这个错误很困惑,因为我还不太熟悉npm,所以任何建议都会大有帮助。谢谢大家!

**已编辑,还添加了默认npm配置以供参考

$ npm config ls -l
; cli configs
long = true
metrics-registry = "https://registry.npmjs.org/"
scope = ""
user-agent = "npm/6.4.1 node/v10.14.0 win32 x64"

; builtin config undefined
prefix = "C:\\Users\\jason\\AppData\\Roaming\\npm"

; default values
access = null
allow-same-version = false
also = null
always-auth = false
audit = true
audit-level = "low"
auth-type = "legacy"
bin-links = true
browser = null
ca = null
cache = "C:\\Users\\jason\\AppData\\Roaming\\npm-cache"
cache-lock-retries = 10
cache-lock-stale = 60000
cache-lock-wait = 10000
cache-max = null
cache-min = 10
cafile = undefined
cert = null
cidr = null
color = true
commit-hooks = true
depth = null
description = true
dev = false
dry-run = false
editor = "notepad.exe"
engine-strict = false
fetch-retries = 2
fetch-retry-factor = 10
fetch-retry-maxtimeout = 60000
fetch-retry-mintimeout = 10000
force = false
git = "git"
git-tag-version = true
global = false
global-style = false
globalconfig = "C:\\Users\\jason\\AppData\\Roaming\\npm\\etc\\npmrc"
globalignorefile = "C:\\Users\\jason\\AppData\\Roaming\\npm\\etc\\npmignore"
group = 0
ham-it-up = false
heading = "npm"
https-proxy = null
if-present = false
ignore-prepublish = false
ignore-scripts = false
init-author-email = ""
init-author-name = ""
init-author-url = ""
init-license = "ISC"
init-module = "C:\\Users\\jason\\.npm-init.js"
init-version = "1.0.0"
json = false
key = null
legacy-bundling = false
link = false
local-address = undefined
loglevel = "notice"
logs-max = 10
; long = false (overridden)
maxsockets = 50
message = "%s"
; metrics-registry = null (overridden)
node-options = null
node-version = "10.14.0"
noproxy = null
offline = false
onload-script = null
only = null
optional = true
otp = null
package-lock = true
package-lock-only = false
parseable = false
prefer-offline = false
prefer-online = false
; prefix = "C:\\Program Files\\nodejs" (overridden)
preid = ""
production = false
progress = true
proxy = null
read-only = false
rebuild-bundle = true
registry = "https://registry.npmjs.org/"
rollback = true
save = true
save-bundle = false
save-dev = false
save-exact = false
save-optional = false
save-prefix = "^"
save-prod = false
scope = ""
script-shell = null
scripts-prepend-node-path = "warn-only"
searchexclude = null
searchlimit = 20
searchopts = ""
searchstaleness = 900
send-metrics = false
shell = "C:\\WINDOWS\\system32\\cmd.exe"
shrinkwrap = true
sign-git-commit = false
sign-git-tag = false
sso-poll-frequency = 500
sso-type = "oauth"
strict-ssl = true
tag = "latest"
tag-version-prefix = "v"
timing = false
tmp = "C:\\Users\\jason\\AppData\\Local\\Temp"
umask = 0
unicode = false
unsafe-perm = true
update-notifier = true
usage = false
user = 0
; user-agent = "npm/{npm-version} node/{node-version} {platform} {arch}" (overridden)
userconfig = "C:\\Users\\jason\\.npmrc"
version = false
versions = false
viewer = "browser"

是否要检查您是否使用
npm whoami
登录到npm


我只是运行了一下,注意到我已经注销了。重新登录修复了该问题。在我登录之前,我可以下载没有作用域名称空间的所有软件包,即我无法下载
@babel/pkg name
@expo/pkg name
等。

请也发布你的.npmrc文件,突然得到这个。我也开始得到这个。。。真奇怪,这里也是。不知从何而来,我们似乎被要求登录。也许最近有一个新的策略启动了。我遇到了这个问题,但是我没有
create-react-app
,而是在现有项目中使用
warn-add--dev-react-scripts
。发布的软件包
2.1.1
似乎存在问题。目前,我只是成功地强制执行以前的版本<代码>纱线添加--dev react-scripts@2.1.0。对于那些想知道WTF添加此包与此问题有何关系的人?这基本上就是
create react app
所做的。对我来说也是一样,在登录后全部恢复正常。也许npm出于某种原因清除了这些会话。嘿,伙计,谢谢!在使用
npm登录登录后,我也让它正常工作了这也是我的问题。在您提到注销之前,我一直在使用
warn
npm
构建项目。通过
npm登录登录后
!全部固定