uniapp打包发行遇到的报错 ReferenceError: require is not defined
运营时一直没出现过,打包时偶尔出现?
[sitemap 索引情况提示] 根据 sitemap 的规则[0],当前页面 [pages/index/index] 将不被索引
VM863:5 app.js错误:
ReferenceError: require is not defined
at <anonymous>:3:9
at doWhenAllScriptLoaded (<anonymous>:11877:21)
at Object.scriptLoaded (<anonymous>:11905:5)
at Object.<anonymous> (<anonymous>:11930:22)
(anonymous) @ VM863:5
doWhenAllScriptLoaded @ VM718:11877
scriptLoaded @ VM718:11905
(anonymous) @ VM718:11930
Promise.then (async)
(anonymous) @ VM718:11951
(anonymous) @ VM718:11955
loadScripts @ assubloader.js:1
async function (async)
loadScripts @ assubloader.js:1
loadAppResourceScripts @ assubloader.js:1
(anonymous) @ VM714:1
t.loadScripts @ VM13 asdebug.js:1
loadAppService @ VM13 asdebug.js:1
messagerCallback @ VM13 asdebug.js:1
(anonymous) @ VM13 asdebug.js:1
g @ VM13 asdebug.js:1
f @ VM13 asdebug.js:1
(anonymous) @ VM13 asdebug.js:1
_ws.onmessage @ VM13 asdebug.js:1
WAService.js?t=wechat&s=1663725472340&v=undefined:0 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
[渲染层错误] Uncaught ReferenceError: wx is not defined
打包之后 点了开发工具面板中的 使用npm模块 就正常了 。
然而取消选择 使用npm模块,也正常了。
很诧异这是什么bug。
0 个回复