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));

就可以了

 


相关文章
|
2月前
|
JavaScript 前端开发 大数据
数字太大了,计算加法、减法会报错,结果不正确?怎么办?用JavaScript实现大数据(超过20位的数字)相加减运算。
数字太大了,计算加法、减法会报错,结果不正确?怎么办?用JavaScript实现大数据(超过20位的数字)相加减运算。
|
2月前
|
JavaScript
报错[Vue warn]: $listeners is readonly. $attrs is readonly.怎么解决?
报错[Vue warn]: $listeners is readonly. $attrs is readonly.怎么解决?
|
2月前
|
JavaScript
Vue报错\page\ComplianceTraceReport\index.vue{ parser: “babylon“ } is deprecated; we now treat it 怎么解决?
Vue报错\page\ComplianceTraceReport\index.vue{ parser: “babylon“ } is deprecated; we now treat it 怎么解决?
|
2月前
|
JavaScript 算法 Linux
【vue报错】error:0308010C:digital envelope routines::unsupported
【vue报错】error:0308010C:digital envelope routines::unsupported
79 3
|
26天前
|
JavaScript 前端开发 开发者
vue3+ts配置跨域报错问题解决:> newpro2@0.1.0 serve > vue-cli-service serve ERROR Invalid options in vue.
【6月更文挑战第3天】在 Vue CLI 项目中遇到 "ERROR Invalid options in vue.config.js: ‘server’ is not allowed" 错误是因为尝试在 `vue.config.js` 中使用不被支持的 `server` 选项。正确配置开发服务器(如代理)应使用 `devServer` 对象,例如设置代理到 `http://xxx.com/`: ```javascript module.exports = { devServer: {
42 1
|
2月前
报错/ ./node_modules/axios/lib/platform/index.js Module parse failed: Unexpected token (5:2)怎么解决?
报错/ ./node_modules/axios/lib/platform/index.js Module parse failed: Unexpected token (5:2)怎么解决?
|
18天前
|
JavaScript 前端开发 Java
JS经常碰见的报错问题
JS经常碰见的报错问题
|
20天前
|
JavaScript UED
ab77b6ea7f3fbf79.JS代码报错什么原因?
网站出现JS报错,表现为黄色小叹号,经排查发现是360自动收录JS引起。这不仅导致页面延迟增加,还影响用户体验。解决方案是删除360的自动推送JS代码。
13 1
|
4天前
|
运维 JavaScript Devops
阿里云云效操作报错合集之node.js构建时,报错:The build failed because the process exited too early.该怎么办
本合集将整理呈现用户在使用过程中遇到的报错及其对应的解决办法,包括但不限于账户权限设置错误、项目配置不正确、代码提交冲突、构建任务执行失败、测试环境异常、需求流转阻塞等问题。阿里云云效是一站式企业级研发协同和DevOps平台,为企业提供从需求规划、开发、测试、发布到运维、运营的全流程端到端服务和工具支撑,致力于提升企业的研发效能和创新能力。
|
2月前
|
JavaScript 前端开发 容器
Vue 3 中 <transition-group> 组件报错的非 props 属性传递问题
Vue 3 中 <transition-group> 组件报错的非 props 属性传递问题
49 1