Closed wangyiyou closed 5 months ago
The package is a CommonJS / UMD build, maybe that requires some configuration in your ESM setup?
How can we reproduce your issue?
该包是 CommonJS / UMD 构建,也许需要在您的 ESM 设置中进行一些配置?
我们如何重现您的问题?
Thank you for your reply. I hope I can use it directly after install. However, there are some errors now. I have looked through the past questions and found no direct answer As for the recurrence problem, I just introduced it and reported an error. I don't know if there is the same problem as me
I had a closer look at the error message, it says "Module parse failed: unexpected token (509:30)" in the file workerpool/dist/workerpool.js
. At that position in the code, optional chaining ?.
is used. So, this is not an issue with ESM/CommonJS, but a relatively new JavaScript operator that is not understood by your setup. The optional chaining operator was introduced 4 years ago. I guess that you have to update your Webpack setup to support the latest JavaScript features.
Closing due to a lack of response. Please reopen if needed.