我最近开始遇到问题npm build
升级到较新版本后react-bootstrap
(1.0.0-beta.6
).
Creating an optimized production build...
Failed to compile.
Cannot find module: '@restart/context/forwardRef'. Make sure this package is installed.
./node_modules/react-bootstrap/es/ThemeProvider.js
You can install this package by running: yarn add @restart/context/forwardRef.
我尝试运行提供的yarn
命令,但这不是有效的包名称。有谁知道如何解决这个问题而不返回到旧版本(不支持选项卡,这是我正在使用的东西)?
这是一个上游问题@重新启动/上下文 https://github.com/react-restart/context/,刚刚发布了一个中断导入的版本forwardRef
像这样:
import forwardRef from '@restart/context/forwardRef'
快速修复是通过运行降级到 2.1.2yarn add @restart/[email protected] /cdn-cgi/l/email-protection
.
更长期的解决办法是等待react-bootstrap
修复其进口或锁定其package.json
到这个版本的@restart/context
.
编辑:我添加了一个问题react-bootstrap
回购协议可在此处跟踪进度:https://github.com/react-bootstrap/react-bootstrap/issues/3576 https://github.com/react-bootstrap/react-bootstrap/issues/3576
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)