-
Notifications
You must be signed in to change notification settings - Fork 8
Module not found: Error during Netlify build (can't resolve 'fs' in ...../require-context.macro) #25
Comments
Where do you actually call the macro? |
/storybook/config.js |
Can you show that code please? |
Apologies Kyle - that was terribly unhelpful of me.
|
That looks fine. Back to your webpack config (this is I'd try to refactor your Storybook config to be immutable. Maybe even drop the |
Hey Kyle, Yep Deleting the
And then under each:
I take your point about using a Is there a way for me to incorporate plugin & preset loading into |
Lemme try and break it down for ya! I'm gonna close this cuz I'm certain it's not an issue with the macro and just how you've configured things, but I'll keep this issue's notifications on and we can parse thru it!
You have a {
"plugins": ["macros"],
"presets": ["babel-preset-gatsby"]
} Can you make it into what you're trying to do in your babel config, and tell me what happens then? {
"plugins": [
"macros",
"@babel/plugin-proposal-class-properties",
"babel-plugin-remove-graphql-queries"
],
"presets": ["@babel/preset-env", "@babel/preset-react", "babel-preset-gatsby"]
} |
Hey now i'm getting the same thing 😅 Looks like CSF + Storyshots isn't quite yet ironed out. I don't think the macro is the issue, but I'll be trying to work with the Storybook team to get this resolved ASAP (especially since it's affecting me now 😂 ) |
Aha thank you @kylemh maybe there's something else at play here! Regardless - thanks for your time to explain what's going on in the config - that all makes sense. I'll have a play around with pushing those into .babelrc and out of the |
Everything works when running the Storybook instance locally (and in fact when deploying to Github pages), but I am getting an error during the Storybook build process on Netlify:
I am running this with
NODE_ENV
variable set totest
within Netlify, as I was previously getting this error:My
.babelrc
file:My
webpack.config.js
file:I realise this is unique to Netlify and I actually have a deployment workaround via Github Pages, just putting this here to try and expand my understanding and figure out what is going on.
The text was updated successfully, but these errors were encountered: