Closed timolegros closed 3 years ago
Hi @timolegros,
Thanks for your issues and subsequent edit. As you say it's likely to be an issue with webpack and cluster - which is part of the node core for forking node processes. Rascal uses it as an optional way to count message delivery attempts in a memory space that will survive if your application crashes.
Happy to keep this ticket open for now to help others, but I try to keep a low number of open issues, so will close after a couple of weeks if things go quiet.
There doesn't seem to be a direct fix for this (please let me know if otherwise) so I just moved the module in my project that used Rascal out and into its own package.
Hi!
I am working on a project that has uses Rascal and that project is a dependency of another project that is bundled with webpack. If I import Rascal anywhere in my project and then attempt to bundle with webpack it causes the following error:
I have looked at some of the other issues for Rascal and it does seem that bundling with webpack should work. Is there a specific webpack configuration that is needed?
In order to replicate this error you can set up a project as follows:
package.json
webpack.config.js
index.js
These should all be files in the same top-level directory so: + rascal-test-project +---+ package.json +---+ webpack.config.js +---+ index.js
I tried to add
cluster
as a fallback to avail. The error occurs on node versions 14.17.0 and 16.2.0 (haven't tested others) as well as on various webpack versions (4-5).Thanks in advance for any help/suggestions!
Edit:
Apparently, this error is not specific to Rascal and is just an issue between
cluster
(a Rascal dependency/native node module) and webpack. I will leave this issue up for now and close it once I have a solution in case anyone else runs into the same error when using Rascal.