我下载了下面提供的所有软件包,并在App.js文件中导入
import 'bootstrap/dist/css/bootstrap.min.css'
import 'jquery/dist/jquery.min.js'
import '@popperjs/core/dist/cjs/popper.js'
import 'bootstrap/dist/js/bootstrap.min.js' // problem in this line
如果我导入引导/dist/js/bootstrap.min.js,那么它将如下
./node_modules/bootstrap/dist/js/bootstrap.min.js
Module not found: Can't resolve 'popper.js' in 'project_root\client\node_modules\bootstrap\dist\js'
即使我复制并粘贴popper.js文件
'project_root\client\node_modules\bootstrap\dist\js'
它仍然显示错误。
发布于 2020-07-13 19:05:03
npm install popper.js --save
Popper是引导所需的依赖项,所以您需要安装它。
https://stackoverflow.com/questions/62881955
复制相似问题