小编L.c*_*xue的帖子

'三'中未找到导出'默认'(导入为'三')

概述在main.js中,添加

import Three from 'three'
Run Code Online (Sandbox Code Playgroud)

Vue.use(Three)

使用npm run dev启动dev服务器.预期的行为Vue项目应该加载没有错误.实际行为dev服务器发出以下警告:

warning  in ./src/main.js
    7:8-14 "export 'default' (imported as 'Three') was not found in 'three'
Run Code Online (Sandbox Code Playgroud)

浏览器的js控制台显示错误:

Uncaught TypeError: Cannot read property 'installed' of undefined
at Function.Vue.use (eval at <anonymous> (app.js:723), <anonymous>:3443:15)
at eval (eval at <anonymous> (app.js:778), <anonymous>:14:45)
at Object.<anonymous> (app.js:778)
at __webpack_require__ (app.js:660)
at fn (app.js:84)
at Object.<anonymous> (app.js:964)
at __webpack_require__ (app.js:660)
at app.js:709
at app.js:712
Run Code Online (Sandbox Code Playgroud)

ecmascript-6 reactjs vue.js

5
推荐指数
1
解决办法
5895
查看次数

标签 统计

ecmascript-6 ×1

reactjs ×1

vue.js ×1