我在 React 应用程序上遇到 npm start 问题

问题描述

我的系统上有一个大型应用的克隆,在我运行 npm install 后,这是我的日志:

arash_sh@arashs-MacBook-Pro talentcoach-web % npm install
npm WARN deprecated react-persian-calendar-date-picker@1.1.6: react-persian-calendar-datepicker is deprecated! please use the new react-modern-calendar-datepicker https://kiarash-z.github.io/react-modern-calendar-datepicker
npm WARN deprecated @formatjs/intl-unified-numberformat@3.3.7: We have renamed the package to @formatjs/intl-numberformat
npm WARN deprecated eslint-loader@2.2.1: This loader has been deprecated. Please use eslint-webpack-plugin
npm WARN deprecated core-js@2.6.12: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please,upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated ant-design-palettes@1.1.3: Please use @ant-design/colors to replace ant-design-palettes
npm WARN deprecated browserslist@2.11.3: browserslist 2 Could fail on reading browserslist >3.0 config used in other tools.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and Could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated browserslist@1.7.7: browserslist 2 Could fail on reading browserslist >3.0 config used in other tools.
npm WARN deprecated core-js@1.2.7: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please,upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated circular-json@0.3.3: Circularjson is in maintenance only,flatted is its successor.
npm WARN deprecated 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).
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm WARN deprecated request@2.88.2: request has been deprecated,see https://github.com/request/request/issues/3142
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the Now deprecated request package,see https://github.com/request/request/issues/3142
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator@5.1.5: this library is no longer supported

> fsevents@1.2.13 install /Users/arash_sh/Desktop/LDI/IranTalent/talentcoach-web/node_modules/fsevents
> node install.js

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:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276: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/arash_sh/Desktop/LDI/IranTalent/talentcoach-web/node_modules/fsevents
gyp ERR! node -v v14.9.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 

> core-js@2.6.12 postinstall /Users/arash_sh/Desktop/LDI/IranTalent/talentcoach-web/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also,the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> core-js-pure@3.8.2 postinstall /Users/arash_sh/Desktop/LDI/IranTalent/talentcoach-web/node_modules/core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"


> core-js@3.8.2 postinstall /Users/arash_sh/Desktop/LDI/IranTalent/talentcoach-web/node_modules/react-app-polyfill/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN notsup Unsupported engine for react-lottie@1.2.3: wanted: {"npm":"^3.0.0"} (current: {"node":"14.9.0","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: react-lottie@1.2.3
npm WARN slick-carousel@1.8.1 requires a peer of jquery@>=1.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-react-app@2.1.0 requires a peer of babel-eslint@^7.2.3 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-react-app@2.1.0 requires a peer of eslint-plugin-jsx-a11y@^5.1.1 but none is installed. You must install peer dependencies yourself.

added 2287 packages from 1103 contributors and audited 2291 packages in 110.296s

79 packages are looking for funding
  run `npm fund` for details

found 80 vulnerabilities (72 low,3 moderate,5 high)
  run `npm audit fix` to fix them,or `npm audit` for details

之后,当我运行 npm start 时,这是我的日志:


> talentcoach-web@0.0.1 prestart /Users/arash_sh/Desktop/LDI/IranTalent/talentcoach-web
> yarn clean

sh: yarn: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! talentcoach-web@0.0.1 prestart: `yarn clean`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the talentcoach-web@0.0.1 prestart 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/arash_sh/.npm/_logs/2021-01-08T17_16_26_747Z-debug.log

我知道项目正在火热进行中。

解决方法

我认为您需要下载并安装 XCode

gyp: No Xcode or CLT version detected!

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...