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

Can't resolve 'fs', brfs browserify problem? #20

Open
mohkoma opened this issue Aug 18, 2021 · 1 comment
Open

Can't resolve 'fs', brfs browserify problem? #20

mohkoma opened this issue Aug 18, 2021 · 1 comment

Comments

@mohkoma
Copy link

mohkoma commented Aug 18, 2021

I'm having hard time to make this package work, I'm keep getting that fs and a modules are missing, I found similar one in the previous issues but I still can't solve it.
I'm using Nuxtjs SSR/webpack and I have never used the browserify.

Is there any clear way to get it work?

image

I appreciate it and thank you in advance 🙏

@connorjclark
Copy link

Some bundlers handle this automatically (example: parcel will inline fs.readFile, but esbuild requires a plugin to do so). If you can't or don't want to configure your bundler to inline this, do what I did:

npx brfs node_modules/timidity/index.js > node_modules/timidity/index.js.tmp
mv node_modules/timidity/index.js.tmp node_modules/timidity/index.js

Put that code in your build script, and then your bundler will only see a file that has already inlined that big file.

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

2 participants