Snowpack dev fails due to worker_threads module #3793
Unanswered
paradoxrevolver
asked this question in
Troubleshooting
Replies: 2 comments
-
I'm experiencing this issue in Snowpack version 3.8.8 (I also tried reverting to earlier versions of Snowpack 3). The docs say to set |
Beta Was this translation helpful? Give feedback.
0 replies
-
I also had this issue and resolved it by adding the rollup plugins to the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I apologize if my understanding of this is flawed, I'm still trying to learn the difference between types of modules and how Snowpack works under the hood.
I have an existing project with a number of npm modules and I'd like to be able to run
snowpack dev
andsnowpack build
. I installed Snowpack and ransnowpack dev
but got a number of errors fromesinstall
telling me that modules likeos
,fs
,path
, andworker_threads
were Node.js built-in modules and had to be "polyfilled." After some reading, I put togethersnowpack.config.mjs
and addedThis fixed everything except for
worker_threads
, which still saysSo, I looked around at Snowpack plugins and Rollup plugins and attempted
but this doesn't change anything, and I haven't convinced myself that any of the alternative worker thread plugins will do anything different. I believe this is a relatively common issue to get, where an npm module can't be processed by Snowpack and a plugin needs to be added or configured to help. I have noted that
worker_threads
is not actually a module available on npm.I think I may be misunderstanding how these plugins work, how to get Snowpack to recognize unusual npm packages, and what
worker_threads
really is. What should I be doing instead?Beta Was this translation helpful? Give feedback.
All reactions