毅会

关注

laravel Uncaught TypeError: Vue is not a constructor

毅会

关注

阅读 114

2022-01-27

在这里插入图片描述
laravel中引入Vue出现以上报错。

处理方法:在resources/js/bootstrap.js文件中加入以下代码, 注意最后一定要有 .default。

window.Vue = require('vue').default;

然后npm run dev编译后再运行。

相关推荐

IT程序员

【捣鼓】TypeError: “x” is not a constructor

IT程序员 52 0 0

辰鑫chenxin

Uncaught TypeError: $(...).Validform is not a function

辰鑫chenxin 201 0 0

绪风

Uncaught TypeError: vue__WEBPACK_IMPORTED_MODULE_20__.reactive is not a function

绪风 89 0 0

非常帅气的昵称吧

解决 uniapp报错:TypeError: WebSocket is not a constructor

非常帅气的昵称吧 46 0 0

乌龙茶3297

webpack 打包报错TypeError: DomHandler is not a constructor

乌龙茶3297 45 0 0

我是小瘦子哟

WebSrorm报错:“TypeError: this.CliEngine is not a constructor”

我是小瘦子哟 48 0 0

晗韩不普通

VueRouter报错:Uncaught TypeError: Object(...) is not a function

晗韩不普通 218 0 0

暮晨夜雪

vue2.0报错:Syntax Error: TypeError: eslint.CLIEngine is not a constructor

暮晨夜雪 76 0 0

分湖芝蘭

jQuery中:Uncaught TypeError: $(...).test is not a function

分湖芝蘭 109 0 0

鱼板番茄

Uncaught TypeError: "element" is read-only

鱼板番茄 19 0 0

精彩评论(0)

0 0 举报