vue-3d-model.umd.js报错You may need an appropriate loader to handle this file type怎么办?

简介: vue-3d-model.umd.js报错You may need an appropriate loader to handle this file type怎么办?

报错信息:

error  in ./node_modules/vue-3d-model/dist/vue-3d-model.umd.js
Module parse failed: Unexpected token (9281:25)
You may need an appropriate loader to handle this file type.
|
|               this.texture = source.texture.clone();
|               this.texture.image = { ...this.texture.image }; // See #20328.
|
|               this.depthBuffer = source.depthBuffer;
 @ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/vue/components/wdyDocumentPreview/index.vue 56:0-44
 @ ./src/vue/components/wdyDocumentPreview/index.vue
 @ ./src/js/routes.js
 @ ./src/js/main.js
 @ multi (webpack)-dev-server/client?http://192.168.1.32:80 webpack/hot/dev-server ./src/js/main.js

找到 node_modules\vue-3d-model\dist\vue-3d-model.umd.js文件

大约是9281行代码

this.texture.image = { ...this.texture.image }; // See #20328.

改成

this.texture.image = JSON.parse(JSON.stringify(this.texture.image));

就可以了

 


相关文章
|
1月前
|
缓存 JavaScript 前端开发
mapbox没有token/token失效,地图闪烁后变空白,报错Error: A valid Mapbox access token is required to use Mapbox GL JS.
本博客介绍了mapbox如何去除token验证,暴力破解mapbox的token验证机制。一劳永逸解决mapbox地图闪现一下然后变成空白,报错Error: A valid Mapbox access token is required to use Mapbox GL JS.的方法,还介绍了类似问题的具体解决思路。 只有锻炼思维才能可持续地解决问题,只有思维才是真正值得学习和分享的核心要素。如果这篇博客能给您带来一点帮助,麻烦您点个赞支持一下,还可以收藏起来以备不时之需,有疑问和错误欢迎在评论区指出~
|
7月前
|
JavaScript
Vue+element_Table树形数据与懒加载报错Error in render: “RangeError: Maximum call stack size exceeded“
本文讨论了在使用Vue和Element UI实现树形数据和懒加载时遇到的“Maximum call stack size exceeded”错误,指出问题的原因通常是因为数据中的唯一标识符`id`不唯一,导致递归渲染造成调用栈溢出。
380 1
Vue+element_Table树形数据与懒加载报错Error in render: “RangeError: Maximum call stack size exceeded“
|
6月前
|
JavaScript 前端开发 开发工具
【Azure Developer】使用JavaScript通过SDK进行monitor-query的client认证报错问题
AADSTS90002: Tenant 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' not found. Check to make sure you have the correct tenant ID and are signing into the correct cloud. Check with your subscription administrator, this may happen if there are no active subscriptions for the tenant.
|
7月前
|
人工智能 JavaScript 索引
Duplicate keys detected: This may cause an update error.【Vue遍历渲染报错的解决】
这篇文章讨论了在Vue中进行列表渲染时遇到的“Duplicate keys detected”错误。这个错误通常发生在使用 `v-for` 指令渲染列表时,如果没有为每个循环项指定一个唯一的 `key` 属性,或者指定的 `key` 属性值重复了。文章提供了导致错误的原始代码示例,并给出了修正后的代码,通过在 `key` 绑定中加入索引确保 `key` 的唯一性。此外,文章还解释了为什么需要唯一 `key` 以及如何解决这个问题。
Duplicate keys detected: This may cause an update error.【Vue遍历渲染报错的解决】
|
6月前
|
JavaScript
Vue启动时报错的解决方案,以及解决相同路径跳转报错的问题
Vue启动时报错的解决方案,以及解决相同路径跳转报错的问题
656 0
|
6月前
|
JavaScript 前端开发
原生js常见报错及其处理方案
原生js常见报错及其处理方案
109 0
|
8月前
|
JavaScript 前端开发 C++
【Azure Function】调试 VS Code Javascript Function本地不能运行,报错 Value cannot be null. (Parameter 'provider')问题
【Azure Function】调试 VS Code Javascript Function本地不能运行,报错 Value cannot be null. (Parameter 'provider')问题
|
8月前
|
JavaScript
VUE——uuid引入报错
VUE——uuid引入报错
181 0
|
8月前
|
JavaScript
Vue——使用JS文件中的函数ESLint报错未定义
Vue——使用JS文件中的函数ESLint报错未定义
102 0
|
8月前
|
JavaScript
Vue——报错总结
Vue——报错总结
79 0