tweenjs导入错误:无法分配仅读取属性'导出'对象'#< object>'

发布于 2025-02-11 01:41:32 字数 216 浏览 0 评论 0原文

我正在使用带有三j的nuxtj。

导入之间后,

import { TWEEN } from 'three/examples/jsm/libs/tween.module.min.js'

我会收到此错误:

无法分配仅读取对象'#object>'的属性'导出''

是否有任何解决方法?

I'm using NuxtJS with ThreeJS.

After I import TWEEN

import { TWEEN } from 'three/examples/jsm/libs/tween.module.min.js'

I get this error:

Cannot assign to read only property 'exports' of object '#<Object>'

Is there any workaround for this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

自此以后,行同陌路 2025-02-18 01:41:32

归根结底,我使用了独立的tweenjs软件包:)

https://github.com /theenjs/twien.js

软件包

npm i @tweenjs/tween.js@^18

安装了导入的tween的

import * as TWEEN from '@tweenjs/tween.js'

At the end of the day, I used standalone tweenjs package and it worked :)

https://github.com/tweenjs/tween.js

Installed the package

npm i @tweenjs/tween.js@^18

Imported TWEEN

import * as TWEEN from '@tweenjs/tween.js'
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文