问题
将项目npm run build打包以后,进入项目本地文件夹dist,打开index.html,页面空白并且报如下错误
解决
中文搜索找到的相关内容都没有解决问题,还是stack overflow稳
vue.js - [Vue warn]: Error in created hook: "TypeError: $ is not a function" - Stack Overflow
所以问题的根源很可能是一个typo(打字错误)
我又仔细看了一遍相关代码,确实是typo,生命周期钩子mounted
被我写成了monuted
改正之后,页面正常显示且不再报错
- TypeError destroyed function Error hooktypeerror destroyed function error getusermedia typeerror navigator function searchlist typeerror function slice javascript typeerror uncaught function defineconfig typeerror function not typeerror classname function taro3 typeerror function track vue3 typeerror function gitbook问题 typeerror function weekday clone error defineconfig vue typeerror