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

Anyone else getting issue: Can't resolve 'fs' in '/node_modules/get-svg-colors' ? #11

Closed
makis-spy opened this issue Feb 9, 2018 · 4 comments

Comments

@makis-spy
Copy link

This library looks awesome but for the life of me cant get it going on storybook with webpack or nextjs.

@makis-spy makis-spy changed the title Anyone else have an issue: Can't resolve 'fs' in '/node_modules/get-svg-colors' ? Anyone else getting issue: Can't resolve 'fs' in '/node_modules/get-svg-colors' ? Feb 9, 2018
@p-mcgowan
Copy link
Contributor

I had the same issue, "fixed" by adding
node: { fs: 'empty' } to webpack.base.config
eg:

module.exports = {
    entry: {
    ...
    module: { ... }
    node: { fs: 'empty' }
}

as per webpack-contrib/css-loader#447

@zeke
Copy link
Member

zeke commented Mar 26, 2018

Sorry I missed this. Can one of you make a note of this in the README?

p-mcgowan pushed a commit to p-mcgowan/get-image-colors that referenced this issue Apr 10, 2018
@topzdev
Copy link

topzdev commented Dec 24, 2019

On your webpack config add this, especially when using framework like vuejs or reactjs

 build: {
    /*
     ** You can extend webpack config here
     */
    extend(config, ctx) {
      config.node = {
        fs: "empty"
      };
    }
  }

@zeke
Copy link
Member

zeke commented Jan 7, 2020

Thanks @TopzTheDev! Would you mind opening a PR to document this?

@zeke zeke closed this as completed in 1d11277 Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants