3

我正在尝试在 laravel 8 中安装 react。我已经尝试过这些解决方案,但在这里不适合我

但是当我运行以下命令时:

php artisan ui react

它说(请运行“npm install && npm run dev”来编译你的新脚手架。)当我运行(npm install)时得到以下结果:

> fsevents@1.2.13 install /Applications/XAMPP/xamppfiles/htdocs/jwt/node_modules/fsevents
> node install.js

  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node
added 1218 packages from 532 contributors and audited 1220 packages in 28.789s

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

found 0 vulnerabilities

当我运行(npm run dev)时出现以下错误:

> @ dev /Applications/XAMPP/xamppfiles/htdocs/jwt
> npm run development


> @ development /Applications/XAMPP/xamppfiles/htdocs/jwt
> mix

    Additional dependencies must be installed. This will only take a moment.
 
    Running: npm install postcss@^8.1 --save-dev --legacy-peer-deps
 
npm WARN notsup Unsupported engine for postcss@8.2.8: wanted: {"node":"^10 || ^12 || >=14"} (current: {"node":"13.1.0","npm":"6.13.1"})
npm WARN notsup Not compatible with your version of node/npm: postcss@8.2.8
npm WARN notsup Unsupported engine for nanoid@3.1.22: wanted: {"node":"^10 || ^12 || ^13.7 || ^14 || >=15.0.1"} (current: {"node":"13.1.0","npm":"6.13.1"})
npm WARN notsup Not compatible with your version of node/npm: nanoid@3.1.22

    Finished. Please run Mix again.
 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ development: `mix`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ development 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/apple/.npm/_logs/2021-03-19T14_16_57_661Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ dev: `npm run development`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ dev 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/apple/.npm/_logs/2021-03-19T14_16_57_703Z-debug.log
apples-iMac-3:jwt apple$ npm install --silent

audited 1220 packages in 8.894s

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

found 0 vulnerabilities
4

0 回答 0