three.js - 包裹未正确捆绑
问题描述
我正在尝试了解有关控件的更多信息,因此我下载了代码以进行测试和学习。(用于上下文)。我有一个捆绑器问题导致这个错误被抛出。有谁知道我将如何解决它?
代码: https ://github.com/simondevyoutube/ThreeJS_Tutorial_CharacterController/blob/main/main.js
包裹设置:
"parcel": "^2.0.0-beta.2",
"parcel-plugin-static-files-copy": "^2.6.0"
错误:
GLTFLoader.js:153 SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)
at GLTFLoader.parse (GLTFLoader.js:283)
at Object.onLoad (GLTFLoader.js:173)
at XMLHttpRequest.<anonymous> (three.module.js:34701)
_onError @ GLTFLoader.js:153
开发工具中的屏幕截图 响应
解决方案
推荐阅读
- swift - Swift last(:where) 数组中的元素
- java - 每个活动都需要视图吗?
- html - 缩放子项上的溢出滚动:X 轴和 Y 轴上的不同行为
- python - 在 Python 中尽可能高效地覆盖混合模式(Numpy,OpenCV)
- reactjs - 我如何用'recompose'重写它?
- c++ - 如何使用 count_if 计算向量中的可变数字范围
- spring-boot - 如何在 Spring Boot 和 JUnit 测试中定义 spring.config.location?
- camera - K2相机的数码显微控制
- javascript - 如果涉及语法错误的单词,我该如何定义函数?
- javascript - 在香草javascript对象中对父母下的孩子进行分组?