TypeError:THREE.FileLoader不是构造函数

时间:2017-05-14 01:44:23

标签: javascript node.js three.js

我在使用three.js为分配工作时遇到问题。我克隆了this repository并使用npm install下载了依赖项。当我运行服务器并加载页面时,我得到TypeError: THREE.FileLoader is not a constructor

这似乎是因为没有FileLoader文件,但我不知道如何解决问题 - 我尝试删除node_module/three的内容并将其替换为最新{{3} },但那给了我Uncaught Error: Cannot find module "three"

我不知道为什么运行npm install没有给我更新版本的three.js并给了我不会运行的代码。我如何解决我的问题?

1 个答案:

答案 0 :(得分:0)

使用"three": "0.82.1"
无法使用FileLoader 只需将three.js版本更新为"three": "^0.84.0"中的package.json,然后再次运行npm i