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

node12.16.0 Operation error #8644

Closed
ShareQiu1994 opened this issue Feb 29, 2020 · 8 comments
Closed

node12.16.0 Operation error #8644

ShareQiu1994 opened this issue Feb 29, 2020 · 8 comments

Comments

@ShareQiu1994
Copy link

ShareQiu1994 commented Feb 29, 2020

I'm using nodejs 12.16.0 and cesium 1.66

In node 12.16.0, I found that cesium couldn't run:

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: D:\github\CesiumJS\server.js
�[90m    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1173:13)�[39m
�[90m    at Module.load (internal/modules/cjs/loader.js:1001:32)�[39m
�[90m    at Function.Module._load (internal/modules/cjs/loader.js:900:14)�[39m
�[90m    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)�[39m
�[90m    at internal/main/run_main_module.js:18:47�[39m {
  code: �[32m'ERR_REQUIRE_ESM'�[39m
}

When I switch to node 10.17.0, cesium 1.66 can run

@ShareQiu1994
Copy link
Author

Does cesium plan to support the new version of nodejs?

@mramato
Copy link
Contributor

mramato commented Feb 29, 2020

@ShareQiu1994 thanks for opening an issue.

Cesium already supports Node 12 and I am unable to reproduce this problem with 12.6.0. Can you please provide the exact steps to recreate it?

It appears Node 12.6.0 has 6 significant regressions that they quickly patched in 12.6.1: https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#2020-02-18-version-12161-erbium-lts-mylesborins Perhaps you are hitting one of these?

@ShareQiu1994
Copy link
Author

@mramato Thank you for your answer.

repro steps:
1.git clone https://github.com/CesiumGS/cesium.git
2.npm install
3.node server.js

My environment:
Nodejs 12.16.1
Cesium 1.66
Windows 10

When I upgraded the node to 12.16.1, I found that the problem still existed.
I don't know if it's a problem with my system environment. I'll try changing the machine.Thank

@mramato
Copy link
Contributor

mramato commented Mar 1, 2020

@ShareQiu1994 My apologize but I can now reproduce this. I accidentally ran with 12.6 instead of 12.16. This is a breaking change during the 12.x line from the NodeJS team. Looks like they changed behavior as of 12.10.

I'm looking into it.

@mramato
Copy link
Contributor

mramato commented Mar 1, 2020

There are 3 issues here:

  1. Cesium's dev server is currently broken under Node 12. (Fixed in Make Cesium release server work on Node 12. #8648)
  2. Using Cesium as node modules is broken in Node 12 & 13.
  3. Cesium's build system is broken in Node 12 & 13.

1 is a showstopper for 1.67, 2 is a showstopper for 1.68, and 3 is stuck waiting on other third party dependencies to update to Node 12.

@mramato
Copy link
Contributor

mramato commented Mar 2, 2020

Updated my above comment but I'm closing this issue in favor of tracking it as part of #8452

@mramato mramato closed this as completed Mar 2, 2020
@ShareQiu1994
Copy link
Author

@mramato Thank you for your efforts, I will continue to pay attention to its changes

@mramato
Copy link
Contributor

mramato commented Mar 19, 2020

This is fixed in master and will be released as part of 1.68 on April 1st.

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

No branches or pull requests

2 participants