Closed HommeSauvage closed 8 years ago
Some here trying to use twilio
NPM updated to 3.10.9 and added
node: { fs: 'empty', net: 'empty', tls: 'empty', },
on webpack.base.babel.js result to me
Those libraries are meant to run in node, not in the browser. What you're seeing means that node-internal modules don't exist in the browser, which, well, they don't. This is expected behaviour, you're trying to make something work that isn't meant to work.
@mxstbr that's why I said that it's an "isomorphic" package. It's supposed to work with node and browser. They come with both versions in the same package. If you use the package algoliasearch
with webpack, it will work regardless of node. Please check:
https://www.npmjs.com/package/algoliasearch#nodejs--react-native--browserify--webpack
They are webpack and browsersify friendly, they're not exclusively node modules.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
I am trying to use
react-algoliasearch-helper
which requiresalgoliasearch
. Algolia claim that their isomorphic library works perfectly with webpack. Now when I tried to include it in the boilerplate, webpack is crashing with this error:I tried following the code and I saw that it's trying to include some debugging features which requires
fs
. The problem is that it's picking the wrong module, instead of pickingbrowser
, it's pickingnode
in the packagedebug-ms-fix-yui-compressor
. This should not be a problem in webpack alone because it works out of the box, but with this boilerplate, it's thinking that it's running in a node environment rather than browser.Steps to reproduce
npm install --save algoliasearch algoliasearch-helper react-algoliasearch-helper
npm start
and you'll get the webpack errorsVersions