ReactJS:npm安装

ReactJS:npm安装,reactjs,Reactjs,我正在创建一个新项目,从一个现有的项目开始 我复制了新文件夹中的所有文件,并已完成npm安装,但收到以下错误: No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'. No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'. No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'

我正在创建一个新项目,从一个现有的项目开始

我复制了新文件夹中的所有文件,并已完成npm安装,但收到以下错误:

No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

gyp: No Xcode or CLT version detected!
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/.../node_modules/redux-pouchdb-plus/node_modules/leveldown
gyp ERR! node -v v12.18.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN extract-text-webpack-plugin@3.0.2 requires a peer of webpack@^3.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN modal-react-native-web@0.2.0 requires a peer of react-art@16.x.x but none is installed. You must install peer dependencies yourself.
npm WARN modal-react-native-web@0.2.0 requires a peer of react-native-web@0.9.x but none is installed. You must install peer dependencies yourself.
npm WARN react-modal-resizable-draggable@0.1.4 requires a peer of react@^15.5.4 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-web-modal@1.0.1 requires a peer of react@^15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-web-modal@1.0.1 requires a peer of react-dom@^15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-web-modal@1.0.1 requires a peer of react-native@^0.x but none is installed. You must install peer dependencies yourself.
npm WARN uglifyjs-webpack-plugin@0.4.6 requires a peer of webpack@^1.9 || ^2 || ^2.1.0-beta || ^2.2.0-rc || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-middleware@1.12.2 requires a peer of webpack@^1.0.0 || ^2.0.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ts-loader@5.4.5 requires a peer of typescript@* but none is installed. You must install peer dependencies yourself.
npm WARN acorn-jsx@5.3.1 requires a peer of acorn@^6.0.0 || ^7.0.0 || ^8.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN The package react is included as both a dev and production dependency.
npm WARN The package react-dom is included as both a dev and production dependency.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! leveldown@2.1.1 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the leveldown@2.1.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/.../.npm/_logs/2021-04-09T13_48_34_244Z-debug.log
我该怎么办


感谢您通过cli再次创建项目。因为当您第一次创建项目时,某些内置机制会将路径保存在其中,如果您更改文件夹名称,它们将丢失路径。

您已使用ReactJS标记,但是这些错误看起来都像ReactNative。@DBS它是reactJS appI已尝试首先使用
npx create react app my app name
创建一个新项目,然后我从另一个项目复制所有文件夹,您说过要这样做吗?不。如果您需要其他目录名,只需创建一个正确的项目名称:)是的,使用我的应用程序名称,我指的是我将创建的应用程序文件夹。您是否复制了
node\u模块
dir?