遵循Github (https://github.com/jitsi/jitsi-meet),我编译的源代码。
在dev server (localhost:8080)上运行时,出现javascript错误,如下所示:
translation.js:26 Uncaught ReferenceError: $ is not defined
at new Translation (translation.js:26)
at Module../modules/translation/translation.js (translation.js:59)
at __webpack_require__ (bootstrap:19)
at Module../app.js (app.js:1)
at __webpack_require__ (bootstrap:19)
at Object.0 (app.bundle.min.js?v=3539:274618)
at __webpack_require__ (bootstrap:19)
at bootstrap:83
at bootstrap:83有什么想法吗?
发布于 2019-07-29 20:44:45
只需在webpack.config.js文件中添加以下代码即可解决$的webpack构建问题。
在文件的顶部包括以下内容:
var webpack = require("webpack");将以下提到的代码包含到配置部分中:
plugins: [
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery"
})
]发布于 2019-07-28 21:49:45
您必须使用此命令在jitsi-meet的根目录中安装依赖项:
npm安装
如果未运行或已运行,请尝试删除node_modules目录,然后重新运行该命令
https://stackoverflow.com/questions/57197208
复制相似问题