为什么我会遇到此错误 - 汇编而成问题:找不到模块:错误:可以分辨出React-Top-loading-bar'安装顶级式酒吧时

发布于 2025-01-26 23:51:06 字数 729 浏览 3 评论 0原文

我想要一个页面上的顶级加载条,但是当我尝试安装NPM时,我会遇到很多错误。 这是我使用的命令 -

npm install --save react-top-loading-bar
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.6.3/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.6.3/umd/react-dom.production.min.js"></script>

以及我端子中的错误 -

的图片

端子 =“ https://i.sstatic.net/ne06l.png” rel =“ nofollow noreferrer”>浏览器的图片

I want a top loading bar on my page but I keep getting a bunch of errors when I tried to install the npm.
this is the command I used-

npm install --save react-top-loading-bar
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.6.3/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.6.3/umd/react-dom.production.min.js"></script>

and the errors in my terminal-

picture of the terminal

and the error on my browser

picture of the browser

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

滥情空心 2025-02-02 23:51:06

这些是您在项目具有不同版本的React时要获取的软件包的上游依赖性问题。

在React 18项目中工作时,我现在也可以通过较旧的包裹得到这些。

您可以用力安装:

npm install --save react-top-loading-bar -f

These are upstream dependency issues from the package you're trying to fetch while your project has a different version of react.

I get these a lot too with older packages now while working in react 18 projects.

You can install with a force:

npm install --save react-top-loading-bar -f
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文