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

webpack failing since highcharts 11.2.0 #252

Open
thomasleveil opened this issue Nov 13, 2023 · 11 comments
Open

webpack failing since highcharts 11.2.0 #252

thomasleveil opened this issue Nov 13, 2023 · 11 comments
Assignees
Labels
Not decided This will not be worked on Pending reply Further information is requested

Comments

@thomasleveil
Copy link

thomasleveil commented Nov 13, 2023

Hi,

I updated the dependencies on my project and webpack now fails since highcharts 11.2.0. If I pin down highcharts to 11.1.0, my project builds correctly.

I see in the highcharts changelog that 11.2.0 introduced the following change :

Upgraded the build pipeline to benefit from new language features. Bundles are now compiled to ES2020 by the TypeScript compiler (.src.js files), and minified by swc (.js files).

I wonder if this change is the reason using highcharts-vue in a webpack project now fails.



 WAIT  Compiling...                                                                                                                                        14:24:29

98% after emitting CopyPlugin

 ERROR  Failed to compile with 1 error                                                                                                                     14:24:30

 error  in ./node_modules/highcharts/highcharts.js

Module parse failed: Unexpected token (8:5207)
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 
|  * License: www.highcharts.com/license
|  */!function(t,e){"object"==typeof module&&module.exports?(e.default=e,module.exports....
@jszuminski
Copy link
Contributor

Thanks for reporting @thomasleveil!

I will investigate this issue this week. In the meantime, could you please share more details about your environment?

  • which version of Node, npm are you using?
  • which version of highcharts-vue are you using?
  • how are you building your project?
  • could you please share your package.json config?

Thanks in advance!

@jszuminski jszuminski self-assigned this Nov 13, 2023
@jszuminski jszuminski added the Not decided This will not be worked on label Nov 13, 2023
@thomasleveil
Copy link
Author

Here are my versions :

  • node v20.8.1
  • highcharts-vue 1.4.3
    we are building using vue-cli, so in the end the command is vue-cli-service serve.
    I cannot share my code as this is not a personal project

@andrescellini
Copy link

same problem

@jszuminski
Copy link
Contributor

Thanks! I'm currently looking into this problem and will try to propose a solution (or at least a workaround) by the end of the next week.

@jszuminski
Copy link
Contributor

You pointed out correctly that the most probable cause of this issue is the following update:

Upgraded the build pipeline to benefit from new language features. Bundles are now compiled to ES2020 by the TypeScript compiler (.src.js files), and minified by swc (.js files).

It seems to me, however, that this issue is unrelated to the highcharts-vue package, but more to the highcharts package. Either way, I will try to help you solve this issue. Could you please share your webpack config so I can take a look?

It might be the case that your webpack configuration does not support the ES2020 format.

By updating your webpack setup and ensuring it can handle ES2020 features, you should be able to resolve the issue and successfully build your project with Highcharts 11.2.0.

@SamPulmanCL
Copy link

SamPulmanCL commented Nov 22, 2023

We are getting the same issue

@jszuminski
Copy link
Contributor

@SamPulmanCL @andrescellini @thomasleveil could you please try to reproduce this issue? It would be great if you could share a minimal reproducible example (like a small .zip) where I could see and investigate this error.

@thomasleveil
Copy link
Author

Hi @jakubSzuminski, unfortunately the project I'm having the issue on is too big of a mess right now for me to successfully upgrade all the tooling dependencies (webpack and so on). I tried and failed. One day or the other we'll have to pay that price, but our current planning and deadlines won't allow that before 2024Q2.

@jszuminski
Copy link
Contributor

Absolutely, I understand. If you cannot update your webpack config then I'd probably advise you to stick with Highcharts 11.1.0 until then.

@evan7diab
Copy link

same to me, it seems the webpack fails to load highcharts.js

@jszuminski
Copy link
Contributor

Could you please reproduce it @evan7diab? We could then investigate this problem and try to propose a solution.

@jszuminski jszuminski added the Pending reply Further information is requested label Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Not decided This will not be worked on Pending reply Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants