react-share util.inherits is not a function webpack 2

て烟熏妆下的殇ゞ 提交于 2019-12-10 19:14:01

问题


i have the next error when i try to include react-share in my app, all compile fine and if i go to another routes where no is loading this library works fine, but when i include it crash.

TypeError: util.inherits is not a function

i am using webpack dev server with webpack 2. i am mocked the next modules

note: i tried to mock utils so because util is not defined in not node env.

node: {
    fs: "empty",
    child_process: "empty",
  },

来源:https://stackoverflow.com/questions/43020296/react-share-util-inherits-is-not-a-function-webpack-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!