首页 > 解决方案 > 包裹未正确捆绑

问题描述

我正在尝试了解有关控件的更多信息,因此我下载了代码以进行测试和学习。(用于上下文)。我有一个捆绑器问题导致这个错误被抛出。有谁知道我将如何解决它?

代码: 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

开发工具中的屏幕截图 响应

预览(无)

标签: three.jscontrolsparcel

解决方案


推荐阅读