-
Notifications
You must be signed in to change notification settings - Fork 28
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
This dependency was not found: fs #5
Comments
Adding: node: {
fs: 'empty'
}, to my webpack config seems to make the error go away. |
I believe the emscripten runtime will try Thank you for solving the problem for Webpack users. I should add this to the usage instructions. Ok, I've added a note about it, but I don't actually know anything about Webpack, so I've linked to this issue: aaf5996 (if you think this should be improved somehow, please let me know or send a PR). |
For anyone else, like me, hitting this error from inside Thanks! :) |
On webpack 5, this package tries to load a few node dependencies:
Do you know whether excluding |
For people that use CRA (create react app), resulting in a v5 React project that uses To get around this, you can use module.exports = function override (config, env) {
let loaders = config.resolve
loaders.fallback = {
"fs": false,
"path": require.resolve("path-browserify"),
}
return config
} And then when running you're app, just replace the original react-scripts reference: /* package.json */
"scripts": {
- "start": "react-scripts start",
+ "start": "react-app-rewired start",
- "build": "react-scripts build",
+ "build": "react-app-rewired build",
- "test": "react-scripts test",
+ "test": "react-app-rewired test",
"eject": "react-scripts eject"
} |
Hello-
I'm trying to use this in my Vue.js app, but when I import like:
I get this error:
I think this is because
fs
is not available in a browser window. I already havefs
in mypackage.json
file and saved tonode_modules
.Should I be doing something else instead? The same thing happens if I use
require
.The text was updated successfully, but these errors were encountered: