0

我正在尝试安装 react-bootstrap。

昨天我成功安装了 react-bootstrap 但后来我卸载了它。今天我试图在同一个项目中重新安装它,但它给了我下面的错误。

然后,我创建了一个新的 react 应用程序作为测试,以尝试安装 react-bootstrap,但它失败并出现相同的错误。

似乎有一个与 husky 相关的问题,所以我安装了这个包,但这也没有帮助。

我正在使用 macOS。

noahgwynn@Noah frontend % npm i react-bootstrap
npm ERR! code 127
npm ERR! path /Users/noahgwynn/Documents/code/udemy-mern/frontend/node_modules/@popperjs/core
npm ERR! command failed
npm ERR! command sh -c husky install .config/husky
npm ERR! sh: husky: command not found

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/noahgwynn/.npm/_logs/2021-02-20T19_52_28_911Z-debug.log
noahgwynn@Noah frontend %  npm install --save react-bootstrap
npm ERR! code 127
npm ERR! path /Users/noahgwynn/Documents/code/udemy-mern/frontend/node_modules/@popperjs/core
npm ERR! command failed
npm ERR! command sh -c husky install .config/husky
npm ERR! sh: husky: command not found

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/noahgwynn/.npm/_logs/2021-02-20T19_55_15_427Z-debug.log
noahgwynn@Noah frontend % 

感谢您的帮助。

编辑:问题已解决!

刚刚再次尝试“npm i react-bootstrap”,这次成功了。几个小时后,不知道发生了什么变化,但我很高兴它发生了变化。

4

0 回答 0