Closed prinkpan closed 3 years ago
I'll check this out today. There are some upcoming changes to go out, and f there's an issue I'll release a fix with that.
Thanks for the report!
For further detail can you give me your build command? It's very likely you're building for the web and need to exclude node specific modules.
You're right, I'm using this on my web app. Not sure what you mean by build command. I get the said error when I run npm run build
. Sorry, I can't give more than this as I'm not so well versed with these tools. Thank you for looking into this.
npm run build
executes whatever is in scripts.build
in your package.json
file, so there's no logic explicitly tied to that... it's wired individually for every module in your package.json.
You probably used a boilerplate generator that created this for you, but did not include commonly used configurations for building clientside versions of serverside modules.
likely you just need to tell it to not include fs
in the browser... either in the babel config's resolve
or in the config of whatever magic you're using on top of it.
Did this get sorted?
I'm going to call this good, reopen if there are issues.
I did a
yarn add ascii-art
in my project, addedwindow.art = require('ascii-art');
and tried to build usingnpm run build
but it gives the following error:Module not found: Can't resolve 'fs' in 'C:....\node_modules\ascii-art-image'
I am not so great with these tools so it can be something at my end that I am doing wrong.