node-twitter
node-twitter copied to clipboard
packaging with webpack
I'm getting errors when packaging with webpack. It can't resolve modules such as 'fs' which makes me wonder if anyone has used webpack in combination with this library. I am on the most up to date version (1.7.0)
fs is a server side library in node core. Its not typically used in client side apps.
I think there is a way to fake it out though. why is node-twitter using fs though?
@anthonyettinger Yeah true... I tried it on my server side code instead and it runs perfectly fine. Guess it's not really a webpack issue
The same here.
Have we resolved anything here:
I'm trying to run this with React and I'm getting the fs issue?
^^^^
Hey guys, you might want to try this. Add the following code in webpack.config.js
. Found this somewhere else, it seems to be a known issue in webpack.
node: {
console: false,
fs: 'empty',
net: 'empty',
tls: 'empty'
}
@heyhujiao unfortunately I've tried your solution and it didn't work out. I'm using webpack also along with react 16.2
does anyone figured it out ?