-
Notifications
You must be signed in to change notification settings - Fork 128
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
cannot find module "fs" #57
Comments
|
7.9.0. I am running webpack through asp.net spa services although that shouldn't matter. |
I'm not sure how webpack plays a part here. I don't use it in my own projects so maybe there's something there I'm missing. Can you post your setup here? |
@aadsm Thanks for the fast responses. I cloned a simple react app with webpack config and just changed the index.js to use jsmediatags. https://github.com/MartinDawson/jsmediatagserror Cd into it then do Same error here. I tried to add
as per this thread suggests: webpack-contrib/css-loader#447 If I do this then I get a different error, cannot find fs.stat. Probably because the above just removes the file system altogether instead of fixing the problem I presume. Don't know what to do. |
Thanks for the repo, I was able to understand how the webpack thingy works.
I don't know much about webpack because I've never used it so no idea what all of these findings mean in this context, but I can tweak the Another thought is: since webpack tries to run node modules on the browser maybe there's a way to polyfil the |
Thanks for reply. That's got me one step closer. https://stackoverflow.com/questions/29096018/react-webpack-process-env-is-undefined It seems that process is defined when A couple of things:
Thanks. |
|
Works fantastic. Thanks for all the help. |
Webpack defines the global "process" variable so just checking for that is not enough to check the environment. Add check for process.browser to make it strong. Fixes #57
Tried install v3.5 and v3.6 and I still get this error as soon as I require or import this package:
Error: cannot find module "fs".
What am I doing wrong? No other npm module gives me this.
Webpack version: 3.0
The text was updated successfully, but these errors were encountered: