Problems Installing CRA & NextJS from NPM (Error: Couldn't find package "@babel/core" on "npm" registry)
Problems Installing CRA & NextJS from NPM (Error: Couldn't find package "@babel/core" on "npm" registry)
TL;DR
以下每个命令都失败并出现类似的错误...
Couldn't find package "@babel/core" on "npm" registry
create-react-app test
npm install --save next
yarn add next
记录 create-react-app test
的结果
Creating a new React app in /Users/ChrisGeirman/dev/node/react/next/test.
Installing packages. This might take a couple minutes.
Installing react, react-dom, and react-scripts...
yarn add v1.7.0
warning ../../package.json: No license field
info No lockfile found.
[1/4] Resolving packages...
⠁ (node:8309) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Bu
ffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
error Couldn't find package "@babel/core" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
warning react-scripts > jest > jest-cli > prompts > kleur@2.0.2: Please upgrade to kleur@3 or migrate to 'ansi-colors' if
you prefer the old syntax. Visit <https://github.com/lukeed/kleur/releases/tag/v3.0.0\> for migration path(s).
warning react-scripts > eslint > file-entry-cache > flat-cache > circular-json@0.3.3: CircularJSON is in maintenance only,
flatted is its successor.
Error: Couldn't find package "@svgr/webpack" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/core" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/code-frame" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/code-frame" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/code-frame" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/traverse" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/parser" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/types" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/plugin-proposal-class-properties" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/plugin-proposal-object-rest-spread" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/plugin-syntax-dynamic-import" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/plugin-proposal-decorators" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/plugin-transform-classes" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/plugin-transform-destructuring" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/plugin-transform-react-display-name" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/preset-env" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/plugin-transform-react-constant-elements" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/plugin-transform-runtime" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/plugin-transform-flow-strip-types" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/preset-react" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/preset-typescript" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/runtime" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@types/tapable" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@webassemblyjs/ast" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@webassemblyjs/helper-module-context" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@webassemblyjs/wasm-edit" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@webassemblyjs/wasm-parser" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@csstools/convert-colors" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@nodelib/fs.stat" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@mrmlnc/readdir-enhanced" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@csstools/convert-colors" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/code-frame" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Aborting installation.
yarnpkg add --exact react react-dom react-scripts has failed.
Deleting generated file... package.json
Deleting test/ from /Users/ChrisGeirman/dev/node/react/next
Done.
记录 npm install --save next
的结果
npm install --save next
npm ERR! code E401
npm ERR! 404 401 Unauthorized: @babel/runtime-corejs2@7.0.0
记录 yarn add next
的结果
yarn add next
yarn add v1.7.0
warning ../package.json: No license field
[1/4] Resolving packages...
error Couldn't find package "@babel/core" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Error: Couldn't find package "@babel/preset-react" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Error: Couldn't find package "@babel/plugin-syntax-dynamic-import" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Error: Couldn't find package "@babel/preset-env" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Error: Couldn't find package "@babel/plugin-transform-runtime" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Error: Couldn't find package "@babel/runtime" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Error: Couldn't find package "@babel/plugin-proposal-class-properties" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Error: Couldn't find package "@babel/runtime-corejs2" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Error: Couldn't find package "@babel/plugin-proposal-object-rest-spread" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Error: Couldn't find package "@babel/template" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Error: Couldn't find package "@webassemblyjs/helper-module-context" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Error: Couldn't find package "@webassemblyjs/wasm-edit" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Error: Couldn't find package "@webassemblyjs/wasm-parser" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Error: Couldn't find package "@webassemblyjs/ast" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
系统信息
- OS: macOS
- 浏览器:N/A
- npm v5.6.0 和 v6.4.1(都尝试过,但失败了)
- yarn v1.7.0
我的问题
我假设这只是我而不是每个人,否则肯定会在开发人员中引起轩然大波。但我不确定如何解决这个问题。我应该完全卸载 node/npm 并重新开始吗?如果是这样,最好的方法是什么?
我们今天早上遇到了同样的问题,删除了对我们有用的 npmrc 文件,希望对您有所帮助!
rm ~/.npmrc
TL;DR
以下每个命令都失败并出现类似的错误...
Couldn't find package "@babel/core" on "npm" registry
create-react-app test
npm install --save next
yarn add next
记录 create-react-app test
的结果
Creating a new React app in /Users/ChrisGeirman/dev/node/react/next/test.
Installing packages. This might take a couple minutes.
Installing react, react-dom, and react-scripts...
yarn add v1.7.0
warning ../../package.json: No license field
info No lockfile found.
[1/4] Resolving packages...
⠁ (node:8309) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Bu
ffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
error Couldn't find package "@babel/core" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
warning react-scripts > jest > jest-cli > prompts > kleur@2.0.2: Please upgrade to kleur@3 or migrate to 'ansi-colors' if
you prefer the old syntax. Visit <https://github.com/lukeed/kleur/releases/tag/v3.0.0\> for migration path(s).
warning react-scripts > eslint > file-entry-cache > flat-cache > circular-json@0.3.3: CircularJSON is in maintenance only,
flatted is its successor.
Error: Couldn't find package "@svgr/webpack" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/core" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/code-frame" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/code-frame" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/code-frame" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/traverse" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/parser" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/types" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/plugin-proposal-class-properties" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/plugin-proposal-object-rest-spread" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/plugin-syntax-dynamic-import" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/plugin-proposal-decorators" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/plugin-transform-classes" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/plugin-transform-destructuring" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/plugin-transform-react-display-name" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/preset-env" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/plugin-transform-react-constant-elements" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/plugin-transform-runtime" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/plugin-transform-flow-strip-types" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/preset-react" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/preset-typescript" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/runtime" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@types/tapable" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@webassemblyjs/ast" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@webassemblyjs/helper-module-context" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@webassemblyjs/wasm-edit" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@webassemblyjs/wasm-parser" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@csstools/convert-colors" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@nodelib/fs.stat" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@mrmlnc/readdir-enhanced" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@csstools/convert-colors" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "@babel/code-frame" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Aborting installation.
yarnpkg add --exact react react-dom react-scripts has failed.
Deleting generated file... package.json
Deleting test/ from /Users/ChrisGeirman/dev/node/react/next
Done.
记录 npm install --save next
的结果
npm install --save next
npm ERR! code E401
npm ERR! 404 401 Unauthorized: @babel/runtime-corejs2@7.0.0
记录 yarn add next
的结果
yarn add next
yarn add v1.7.0
warning ../package.json: No license field
[1/4] Resolving packages...
error Couldn't find package "@babel/core" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Error: Couldn't find package "@babel/preset-react" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Error: Couldn't find package "@babel/plugin-syntax-dynamic-import" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Error: Couldn't find package "@babel/preset-env" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Error: Couldn't find package "@babel/plugin-transform-runtime" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Error: Couldn't find package "@babel/runtime" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Error: Couldn't find package "@babel/plugin-proposal-class-properties" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Error: Couldn't find package "@babel/runtime-corejs2" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Error: Couldn't find package "@babel/plugin-proposal-object-rest-spread" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Error: Couldn't find package "@babel/template" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Error: Couldn't find package "@webassemblyjs/helper-module-context" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Error: Couldn't find package "@webassemblyjs/wasm-edit" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Error: Couldn't find package "@webassemblyjs/wasm-parser" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Error: Couldn't find package "@webassemblyjs/ast" on the "npm" registry.
at MessageError.ExtendableBuiltin (/Users/ChrisGeirman/.yarn/lib/cli.js:243:66)
at new MessageError (/Users/ChrisGeirman/.yarn/lib/cli.js:272:123)
at NpmResolver.<anonymous> (/Users/ChrisGeirman/.yarn/lib/cli.js:52381:15)
at Generator.next (<anonymous>)
at step (/Users/ChrisGeirman/.yarn/lib/cli.js:98:30)
at /Users/ChrisGeirman/.yarn/lib/cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
系统信息
- OS: macOS
- 浏览器:N/A
- npm v5.6.0 和 v6.4.1(都尝试过,但失败了)
- yarn v1.7.0
我的问题
我假设这只是我而不是每个人,否则肯定会在开发人员中引起轩然大波。但我不确定如何解决这个问题。我应该完全卸载 node/npm 并重新开始吗?如果是这样,最好的方法是什么?
我们今天早上遇到了同样的问题,删除了对我们有用的 npmrc 文件,希望对您有所帮助!
rm ~/.npmrc