今天使用 uni-app 编译后的代码导入微信小程序,结果控制台报错:
app.js错误: TypeError: Cannot read property 'mark' of undefined at vendor.js? [sm]:14806 at vendor.js? [sm]:14806 at Module.<anonymous> (vendor.js? [sm]:14806) at Module.<anonymous> (vendor.js? [sm]:14928) at __webpack_require__ (runtime.js? [sm]:92) at Module.<anonymous> (vendor.js? [sm]:13981) at Module.<anonymous> (vendor.js? [sm]:14144) at __webpack_require__ (runtime.js? [sm]:92) at Object.<anonymous> (main.js? [sm]:24) at Object.<anonymous> (main.js? [sm]:49)(env: Windows,mp,1.05.2103262; lib: 2.16.0) TypeError: Cannot read property 'mark' of undefined at vendor.js? [sm]:14806 at vendor.js? [sm]:14806 at Module.<anonymous> (vendor.js? [sm]:14806) at Module.<anonymous> (vendor.js? [sm]:14928) at __webpack_require__ (runtime.js? [sm]:92) at Module.<anonymous> (vendor.js? [sm]:13981) at Module.<anonymous> (vendor.js? [sm]:14144) at __webpack_require__ (runtime.js? [sm]:92) at Object.<anonymous> (main.js? [sm]:24) at Object.<anonymous> (main.js? [sm]:49)(env: Windows,mp,1.05.2103262; lib: 2.16.0) Page "pages/index/index" has not been registered yet.
解决方法:
微信开发者工具——详情——ES6 转 ES5 前面的勾去掉就可以了。
未经允许不得转载:前端资源网 - w3h5 » uni-app编译微信小程序报错Page "pages/..." has not been registered yet的解决方法