今天更新开发者工具,新建项目报错,报错内容如下:
app.js错误:
Error: module "app.js" is not defined
at require (VM13 WAService.js:2)
at <anonymous>:7:9
at doWhenAllScriptLoaded (appservice?t=1640829246817:1199)
at HTMLScriptElement.scriptLoaded (appservice?t=1640829246817:1227)
at HTMLScriptElement.script.onload (appservice?t=1640829246817:1236)(env: Windows,mp,1.05.2112292; lib: 2.17.0)
(anonymous) @ VM24:9
doWhenAllScriptLoaded @ appservice?t=1640829246817:1199
scriptLoaded @ appservice?t=1640829246817:1227
script.onload @ appservice?t=1640829246817:1236
load (async)
(anonymous) @ appservice?t=1640829246817:1235
(anonymous) @ appservice?t=1640829246817:1277
VM13 WAService.js:2 Error: module "app.js" is not defined
at require (VM13 WAService.js:2)
at <anonymous>:7:9
at doWhenAllScriptLoaded (appservice?t=1640829246817:1199)
at HTMLScriptElement.scriptLoaded (appservice?t=1640829246817:1227)
at HTMLScriptElement.script.onload (appservice?t=1640829246817:1236)(env: Windows,mp,1.05.2112292; lib: 2.17.0)
errorReport @ VM13 WAService.js:2
thirdErrorReport @ VM13 WAService.js:2
(anonymous) @ VM13 WAService.js:2
f @ VM13 WAService.js:2
s @ VM13 WAService.js:2
c @ VM12 asdebug.js:1
window.onerror @ VM8:10
doWhenAllScriptLoaded @ appservice?t=1640829246817:1199
scriptLoaded @ appservice?t=1640829246817:1227
script.onload @ appservice?t=1640829246817:1236
error (async)
t.default @ VM8:10
(anonymous) @ VM8:10
n @ VM8:1
(anonymous) @ VM8:1
(anonymous) @ VM8:1
VM13 WAService.js:2 Error: module "app.js" is not defined
at require (VM13 WAService.js:2)
at <anonymous>:7:9
at doWhenAllScriptLoaded (appservice?t=1640829246817:1199)
at HTMLScriptElement.scriptLoaded (appservice?t=1640829246817:1227)
at HTMLScriptElement.script.onload (appservice?t=1640829246817:1236)(env: Windows,mp,1.05.2112292; lib: 2.17.0)
errorReport @ VM13 WAService.js:2
thirdErrorReport @ VM13 WAService.js:2
(anonymous) @ VM13 WAService.js:2
f @ VM13 WAService.js:2
s @ VM13 WAService.js:2
(anonymous) @ VM13 WAService.js:2
value @ VM13 WAService.js:2
(anonymous) @ VM13 WAService.js:2
doWhenAllScriptLoaded @ appservice?t=1640829246817:1199
scriptLoaded @ appservice?t=1640829246817:1227
script.onload @ appservice?t=1640829246817:1236
error (async)
(anonymous) @ VM13 WAService.js:2
(anonymous) @ VM13 WAService.js:2
(anonymous) @ VM13 WAService.js:2
2[sitemap 索引情况提示] 根据 sitemap 的规则[0],当前页面 [pages/index/index] 将被索引
[ appservice 生成错误] utils/util.js: file: utils/util.js
Cannot find module '@babel/plugin-proposal-private-methods'
Require stack:
- C:\Users\Administrator\AppData\Local\微信开发者工具\User Data\2a1954bbe6cd9e8fe4f1f171d120c9ea\WeappCode\package.nw\js\common\compiler\utils\babel_helper.js
- C:\Users\Administrator\AppData\Local\微信开发者工具\User Data\2a1954bbe6cd9e8fe4f1f171d120c9ea\WeappCode\package.nw\js\common\compiler\core\worker_thread\task\compilejs.js
- C:\Users\Administrator\AppData\Local\微信开发者工具\User Data\2a1954bbe6cd9e8fe4f1f171d120c9ea\WeappCode\package.nw\js\common\compiler\core\worker_thread\task\index.js
- C:\Users\Administrator\AppData\Local\微信开发者工具\User Data\2a1954bbe6cd9e8fe4f1f171d120c9ea\WeappCode\package.nw\js\common\compiler\core\worker_thread\worker.js(env: Windows,mp,1.05.2112292; lib: 2.17.0)
[ appservice 生成错误] app.js: file: app.js
Cannot find module '@babel/plugin-proposal-private-methods'
Require stack:
- C:\Users\Administrator\AppData\Local\微信开发者工具\User Data\2a1954bbe6cd9e8fe4f1f171d120c9ea\WeappCode\package.nw\js\common\compiler\utils\babel_helper.js
- C:\Users\Administrator\AppData\Local\微信开发者工具\User Data\2a1954bbe6cd9e8fe4f1f171d120c9ea\WeappCode\package.nw\js\common\compiler\core\worker_thread\task\compilejs.js
- C:\Users\Administrator\AppData\Local\微信开发者工具\User Data\2a1954bbe6cd9e8fe4f1f171d120c9ea\WeappCode\package.nw\js\common\compiler\core\worker_thread\task\index.js
- C:\Users\Administrator\AppData\Local\微信开发者工具\User Data\2a1954bbe6cd9e8fe4f1f171d120c9ea\WeappCode\package.nw\js\common\compiler\core\worker_thread\worker.js(env: Windows,mp,1.05.2112292; lib: 2.17.0)
[ appservice 生成错误] pages/index/index.js: file: pages/index/index.js
Cannot find module '@babel/plugin-proposal-private-methods'
Require stack:
- C:\Users\Administrator\AppData\Local\微信开发者工具\User Data\2a1954bbe6cd9e8fe4f1f171d120c9ea\WeappCode\package.nw\js\common\compiler\utils\babel_helper.js
- C:\Users\Administrator\AppData\Local\微信开发者工具\User Data\2a1954bbe6cd9e8fe4f1f171d120c9ea\WeappCode\package.nw\js\common\compiler\core\worker_thread\task\compilejs.js
- C:\Users\Administrator\AppData\Local\微信开发者工具\User Data\2a1954bbe6cd9e8fe4f1f171d120c9ea\WeappCode\package.nw\js\common\compiler\core\worker_thread\task\index.js
- C:\Users\Administrator\AppData\Local\微信开发者工具\User Data\2a1954bbe6cd9e8fe4f1f171d120c9ea\WeappCode\package.nw\js\common\compiler\core\worker_thread\worker.js(env: Windows,mp,1.05.2112292; lib: 2.17.0)
[ appservice 生成错误] pages/logs/logs.js: file: pages/logs/logs.js
Cannot find module '@babel/plugin-proposal-private-methods'
Require stack:
- C:\Users\Administrator\AppData\Local\微信开发者工具\User Data\2a1954bbe6cd9e8fe4f1f171d120c9ea\WeappCode\package.nw\js\common\compiler\utils\babel_helper.js
- C:\Users\Administrator\AppData\Local\微信开发者工具\User Data\2a1954bbe6cd9e8fe4f1f171d120c9ea\WeappCode\package.nw\js\common\compiler\core\worker_thread\task\compilejs.js
- C:\Users\Administrator\AppData\Local\微信开发者工具\User Data\2a1954bbe6cd9e8fe4f1f171d120c9ea\WeappCode\package.nw\js\common\compiler\core\worker_thread\task\index.js
- C:\Users\Administrator\AppData\Local\微信开发者工具\User Data\2a1954bbe6cd9e8fe4f1f171d120c9ea\WeappCode\package.nw\js\common\compiler\core\worker_thread\worker.js(env: Windows,mp,1.05.2112292; lib: 2.17.0)
[ appservice 生成错误] .eslintrc.js: file: .eslintrc.js
Cannot find module '@babel/plugin-proposal-private-methods'
Require stack:
- C:\Users\Administrator\AppData\Local\微信开发者工具\User Data\2a1954bbe6cd9e8fe4f1f171d120c9ea\WeappCode\package.nw\js\common\compiler\utils\babel_helper.js
- C:\Users\Administrator\AppData\Local\微信开发者工具\User Data\2a1954bbe6cd9e8fe4f1f171d120c9ea\WeappCode\package.nw\js\common\compiler\core\worker_thread\task\compilejs.js
- C:\Users\Administrator\AppData\Local\微信开发者工具\User Data\2a1954bbe6cd9e8fe4f1f171d120c9ea\WeappCode\package.nw\js\common\compiler\core\worker_thread\task\index.js
- C:\Users\Administrator\AppData\Local\微信开发者工具\User Data\2a1954bbe6cd9e8fe4f1f171d120c9ea\WeappCode\package.nw\js\common\compiler\core\worker_thread\worker.js(env: Windows,mp,1.05.2112292; lib: 2.17.0)
Page "pages/index/index" has not been registered yet.
抱歉,在 1.05.2112292 版本出现这个问题,
请先使用菜单-微信开发者工具-快速回退,进行版本回退
出现这个问题的原因是编译模块 miniprogram-ci 为了支持 ecmascript 2021 的特性 #privateMethod,但是在主工程中忘记添加相应依赖导致的。现有的自动化测试用例未覆盖到这个情况,后续会补齐。
各位大神,更新微信开发者工具后 新建项目和运行旧项目报错是怎么回事