gpt4 book ai didi

javascript - 从 NPM 安装 CRA 和 NextJS 时出现问题(错误 : Couldn't find package "@babel/core" on "npm" registry)

转载 作者:搜寻专家 更新时间:2023-11-01 00:27:41 27 4
gpt4 key购买 nike

长话短说

以下每个命令都失败并出现类似的错误...

Couldn't find package "@babel/core" on "npm" registry

  • create-react-app 测试
  • npm install --save next
  • yarn add next

create-react-app 测试的日志结果

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)

系统信息

  • 操作系统:macOS
  • 浏览器:不适用
  • npm v5.6.0 和 v6.4.1(都尝试过,但失败了)
  • yarn v1.7.0

我的问题

我假设这只是我而不是每个人,否则肯定会在开发人员中引起轩然大波。但我不确定如何解决这个问题。我应该完全卸载 node/npm 并重新开始吗?如果是这样,最好的方法是什么?

最佳答案

我们今天早上遇到了同样的问题,删除了对我们有用的 npmrc 文件,希望对您有所帮助!rm ~/.npmrc

关于javascript - 从 NPM 安装 CRA 和 NextJS 时出现问题(错误 : Couldn't find package "@babel/core" on "npm" registry),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53525420/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com