-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
"/node_modules/cesium/Source/ThirdParty/zip.js" this file can't not be packed #9790
Comments
Yes, I also encountered this problem when I upgraded to version 1.85. Other people also suffered. |
As a temp resolution, you can edit your package.json as following: |
The 1.84 version I used before has no problems. |
Thanks all for catching this and opening the issue. We'll look into this asap. @srothst1 This looks like it might be a regression with webpack after 1.85.. |
The following is my project.
When I returned the version to 1.84.0, the problem disappeared. |
Hello,
I having a "template project" (https://github.com/meschg/vue-stack-cesium) for testing updates before updating my main application. I know it is not a "minimal sample" but checking multiple packages together is for me important. Might it helps you to find this error Steps to reproduce:
I did not have time yet to look into more yet, not sure when I have time to do so. More input is welcome. Thanks to all investigating/working on this! Kind regards, |
This seems to be a regression from #9706. I marked this issue as |
nuxt.js meet this error |
@puxiao - I tried creating a react project with the same configs as the ones you posted on Node 14 (LTS) and 16. I was unable to reproduce the error when building the project. I was able to fix another issue with the 1.85 version of zip.js by making the following change in https://github.com/CesiumGS/cesium/blob/main/ThirdParty/npm/zip.js: - import * as zip from "@zip.js/zip.js/lib/zip.js";
+ import * as zip from "@zip.js/zip.js/lib/zip-no-worker.js";
+ zip.configure({
+ useWebWorkers: false
+ }); To test this with your app locally, you can run
I'll keep digging into this but if anyone is able to try the above workaround please do post a comment! |
I found out the cause of the problem. gildas-lormeau/zip.js#258 (comment)
|
My cesium.js 1.85 can be compiled normally in webpack4. Apart from
By the way, today is China's Mid-Autumn Festival. I wish everyone: 中秋节快乐!Happy Mid-Autumn Festival ! …… ^_^ …… |
@ebogo1 I run a build with your changes but instead of using the cesium-1.85.0.tgz I copy everything over into the node-modules folder because the other rules I also have in place. Now it get a different error in the KmlDataSource.js which seems to use a similar import.
I hope it helps. Not sure if the problem is related to the I wasn't able to adapt the other changes with |
After my attempt, I have fixed the problem you encountered.
|
@puxiao workaround with the @ebogo1 I could provide a branch with my template if required but it seems to be identical for each webpack project. |
@puxiao but when I build It cause a error : Syntax Error: Thread Loader (Worker 0) |
@blissvisitor You can try this demo: https://github.com/puxiao/cesium-issues-9790 |
I tried @open-wc/webpack-import-meta-loader ,It can run nornal,but my problem is when I build my project with 'yarn run build' It comes a error Syntax Error: Thread Loader (Worker 0) |
I find the answer, add the include to ignore other files, make it only affect Cesium. |
{ this can temp resolve the problem |
Hi all - we're going to close this issue and for now, we recommend that for webpack 4 you use Alternatively, I have had success with using rollup-plugin-modify to find and replace Thanks again to all who reported this and helped out! |
Good news! The author of " I fixed this issue in the version v2.3.12, see https://github.com/gildas-lormeau/zip.js/releases/tag/v2.3.12 "
|
@puxiao Ah great - thanks for posting about it here! We just merged the update to 2.3.12 to |
I tried version1.87.0,which used zip.js 2.3.12,but it has same problem. |
@wikiNed Could you please share details of what you're doing to reproduce the issue? |
My project:
The following is my
when I run my project,the same problem:
|
I've created my own webpack config based loosely off of create react app. I have not yet tried But just out of the box Cesium 1.87.1 fails to start with the same error given above by others. I will try adding |
Not sure why this is closed, ATM, we are prevented from upgrading cesium. |
@jony89 For now, since this is an issue with the zip.js library we use in CesiumJS, our best workaround is to use the In the meantime, if anyone finds a better workaround that could work for CesiumJS we'd be happy to take a look at a pull request! |
So If anyone has a different loader it will be great. (Or for the cesium team to use a different zip library) |
@open-wc/webpack-import-meta-loader 会导致我的vue项目打包有问题 |
If you use react,the latest version of https://github.com/facebook/create-react-app/releases/tag/v5.0.0 |
at cesium1.89 , vueCli4 + webpack vue.config.js addLoader after
development run success, but build error Syntax Error: Thread Loader (Worker 0) |
at cesium1.89 , vueCli4 + webpack , This method does not work.. |
Module parse failed: Unexpected token (1565:71)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| if (!workerData.interface) {
| try {
| } catch (error) {
| workerData.worker = new Worker(new URL(workerData.scripts[0], import.meta.url), { type: "module" });
The text was updated successfully, but these errors were encountered: