[Deprecation] SharedArrayBuffer will require cross-origin isolation as of M92, around July 2021. See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details.
[system] WeChatLib: 3.11.1 (2025.11.7 17:31:41)
[system] Subpackages: N/A
[system] LazyCodeLoading: true
[Perf] 全局自定义组件可能影响按需注入的效果,请谨慎使用(在 app.json 中检测到 3 个)。
参考 https://developers.weixin.qq.com/miniprogram/dev/framework/ability/lazyload.html
Lazy code loading is enabled. Only injecting required components.
SyntaxError: Unexpected token 'export'
at loadScriptSync (getmainpackage.js:172)
at getmainpackage.js:175
at getmainpackage.js:233
at d.loadScripts (index.js:1)(env: Windows,mp,1.06.2504060; lib: 3.11.1)
SyntaxError: Unexpected token 'export'
at loadScriptSync (getmainpackage.js:172)
at getmainpackage.js:175
at getmainpackage.js:233
at d.loadScripts (index.js:1)(env: Windows,mp,1.06.2504060; lib: 3.11.1)
SyntaxError: Cannot use import statement outside a module
at loadScriptSync (<anonymous>:20:19)
at <anonymous>:22:5
at <anonymous>:23:5
at evaluateRes (index.js:1)
at index.js:1
at Object.invoke (index.js:1)
at Object.invoke (WAServiceMainContext.js?t=wechat&v=3.11.1:1)
at VM524 WASubContext.js:1
at VM524 WASubContext.js:1
at Mr (VM524 WASubContext.js:1)(env: Windows,mp,1.06.2504060; lib: 3.11.1)
loadScriptSync @ VM560:20
(anonymous) @ VM560:22
(anonymous) @ VM560:23
SyntaxError: Cannot use import statement outside a module
at loadScriptSync (<anonymous>:20:19)
at <anonymous>:22:5
at <anonymous>:23:5
at evaluateRes (index.js:1)
at index.js:1
at Object.invoke (index.js:1)
at Object.invoke (WAServiceMainContext.js?t=wechat&v=3.11.1:1)
at VM524 WASubContext.js:1
at VM524 WASubContext.js:1
at Mr (VM524 WASubContext.js:1)(env: Windows,mp,1.06.2504060; lib: 3.11.1)
loadScriptSync @ VM560:20
(anonymous) @ VM560:22
(anonymous) @ VM560:23
VM575:11 页面【pages/main/main]错误:
Error: module 'pages/main/main.js' is not defined, require args is 'pages/main/main.js'
at q (VM524 WASubContext.js:1)
at <anonymous>:8:5
at evaluateRes (index.js:1)
at index.js:1
at Object.invoke (index.js:1)
at Object.invoke (WAServiceMainContext.js?t=wechat&v=3.11.1:1)
at VM524 WASubContext.js:1
at VM524 WASubContext.js:1
at Mr (VM524 WASubContext.js:1)
at VM524 WASubContext.js:1(env: Windows,mp,1.06.2504060; lib: 3.11.1)
(anonymous) @ VM575:11
Error: module 'pages/main/main.js' is not defined, require args is 'pages/main/main.js'
at q (VM524 WASubContext.js:1)
at <anonymous>:8:5
at evaluateRes (index.js:1)
at index.js:1
at Object.invoke (index.js:1)
at Object.invoke (WAServiceMainContext.js?t=wechat&v=3.11.1:1)
at VM524 WASubContext.js:1
at VM524 WASubContext.js:1
at Mr (VM524 WASubContext.js:1)
at VM524 WASubContext.js:1(env: Windows,mp,1.06.2504060; lib: 3.11.1)
Error: module 'pages/main/main.js' is not defined, require args is 'pages/main/main.js'
at q (VM524 WASubContext.js:1)
at <anonymous>:8:5
at evaluateRes (index.js:1)
at index.js:1
at Object.invoke (index.js:1)
at Object.invoke (WAServiceMainContext.js?t=wechat&v=3.11.1:1)
at VM524 WASubContext.js:1
at VM524 WASubContext.js:1
at Mr (VM524 WASubContext.js:1)
at VM524 WASubContext.js:1(env: Windows,mp,1.06.2504060; lib: 3.11.1)
Component is not found in path "wx://not-found".(env: Windows,mp,1.06.2504060; lib: 3.11.1)
[基础库] 正在使用灰度中的基础库 3.11.1 进行调试。如有问题,请前往工具栏-详情-本地设置更改基础库版本。
[system] Launch Time: 1190 ms
微信开发者工具 -- 删除项目,重新导入就正常了![[[笑cry]]](http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/4a/2018new_xiaoku_org.png)
-----
结帖
经过测试,你提供的压缩包中的代码,当在VcnStudio和微信官方IDE工具中打开都没有任何问题,也没显示错误,根据你提供的图片错误信息,应该是微信小程序官方IDE工具的缓存导致的,可以尝试在微信IDE中清空所有缓存然后再在微信小程序的IDE中重新点击编译试试。
微信小程序相关视频教程:https://www.bilibili.com/video/BV1UH4y157wp
另外一个问题,编译卡住,无法继续编译,必现
经过测试,你提供的压缩包中的代码,当在VcnStudio和微信官方IDE工具中打开都没有任何问题,也没显示错误,根据你提供的图片错误信息,应该是微信小程序官方IDE工具的缓存导致的,可以尝试在微信IDE中清空所有缓存然后再在微信小程序的IDE中重新点击编译试试。
微信小程序相关视频教程:https://www.bilibili.com/video/BV1UH4y157wp
缓存重新清空过了,还是不行,新建例程也跑不过
经过测试,你提供的压缩包中的代码,当在VcnStudio和微信官方IDE工具中打开都没有任何问题,也没显示错误,根据你提供的图片错误信息,应该是微信小程序官方IDE工具的缓存导致的,可以尝试在微信IDE中清空所有缓存然后再在微信小程序的IDE中重新点击编译试试。
微信小程序相关视频教程:https://www.bilibili.com/video/BV1UH4y157wp