Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The requested module xxx does not provide an export named 'default' #34

Closed
JSMifans opened this issue Aug 4, 2022 · 14 comments
Closed

Comments

@JSMifans
Copy link

JSMifans commented Aug 4, 2022

mersenne-twister.js?v=f6216b95:1 Uncaught SyntaxError: The requested module '/node_modules/mersenne-twister/src/mersenne-twister.js?v=f6216b95' does not provide an export named 'default' (at mersenne-twister.js?v=f6216b95:1:10)

@JSMifans JSMifans changed the title 创建项目 The requested module xxx does not provide an export named 'default' Aug 4, 2022
@nshen
Copy link
Owner

nshen commented Aug 4, 2022

is this a bug of mersenne-twister

@JSMifans
Copy link
Author

JSMifans commented Aug 4, 2022

这是mersenne-twister的 bug吗?

是的把. 我把 mersenne-twister 改了 default 导出 后面就会有更多模块报错

@nshen
Copy link
Owner

nshen commented Aug 4, 2022

暂时先把 cesium 降级到 1.96.0 以下吧

@jingtian168
Copy link

跟本插件没什么关系吧。。。

这个问题你是怎么解决的?

@janhartmann
Copy link
Contributor

I am facing the same problem with the update of Cesium to 1.96.0.

@nshen
Copy link
Owner

nshen commented Aug 6, 2022

Seems like 1.96.0 has a big upgrade, I haven't got time to try it yet. It's really welcome to make a PR.

https://cesium.com/blog/2022/08/01/cesium-releases-in-august-2022/
https://cesium.com/blog/2022/07/19/build-tooling-updates-coming-to-cesiumjs/

@nshen
Copy link
Owner

nshen commented Aug 6, 2022

hi @jingtian168 @JSMifans 由于cesium 1.96.0 改动较大,临时解决办法,固定 cesium 在 1.95.0 版本

Temporary solution: do not use 1.96.0, use 1.95.0

image

@meschg
Copy link

meschg commented Aug 7, 2022

Yes i can reproduce this issue in two project using https://github.com/meschg/vue-stack-cesium and also created the cesium issue above.
@nshen thanks for providing the vite plugin :)
Best wishes

@nshen
Copy link
Owner

nshen commented Aug 7, 2022

Thanks @meschg , I'll keep watching that cesium issue.

your project and worldtrix.com look super cool. I hope I can do some cool projects like that and play with cesium framework. But since my job now is not related to cesium, I don't have much time on that.

@nshen
Copy link
Owner

nshen commented Aug 20, 2022

please try vite-plugin-cesium 1.2.21 with cesium 1.96.0, leave a comment if you find any problem, thanks. @JSMifans @janhartmann @jingtian168 @meschg

  "devDependencies": {
    "cesium": "^1.96.0",
    "vite": "^3.0.4",
    "vite-plugin-cesium": "^1.2.21"
  }

@meschg
Copy link

meschg commented Aug 20, 2022

Hi @nshen,
sorry for my late answer but I had two busy weeks at work. Thanks checking out my projects and for providing the vite-plugin. This helps me a lot!

The fix works for my projects and I confirm everything works with cesium@1.96.0 and vite-plugin-cesium@1.2.21.

I believe the only issue left is that the npm dep was not updated to 1.96.0 from 1.95.0.
I get for further managing deb. with npm without --force:

npm ERR! While resolving: vite-plugin-cesium@1.2.21
npm ERR! Found: cesium@1.96.0
npm ERR! node_modules/cesium
npm ERR!   cesium@"^1.96.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer cesium@"1.95.0" from vite-plugin-cesium@1.2.21

Or was this keep for a reason?

"cesium": "1.95.0",

Kind regards,
meschg

@nshen
Copy link
Owner

nshen commented Aug 20, 2022

Hi @meschg try 1.2.22

"cesium": "^1.95.0",

@meschg
Copy link

meschg commented Aug 21, 2022

Hi @nshen, 1.2.22 works perfectly. Thanks :)

@xiasun
Copy link

xiasun commented May 22, 2024

Any updates, gentlemen? The issue with the lack of a default export still persists in the latest version of CesiumJS. It's rather confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants