Nwb: Cannot resolve module - errors while using 'request' lib

Created on 2 Mar 2016  路  1Comment  路  Source: insin/nwb

Hi @insi,

I've got the same issue as described here:

https://github.com/request/request/issues/1529

I've tried the proposed fix - adding webpack.config.js - but it's not working.

Could you have a look and describe how to fix it inside nwb?

Thanks a lot,

Alex

Most helpful comment

Found how to solve this issue by adding webpack.extra inside nwb.config.js after reading the Configuration documentation: https://github.com/insin/nwb/blob/master/docs/Configuration.md#extra-object

module.exports = {
  ...
  webpack: {
    extra: {
      module: {
        noParse: /node_modules\/json-schema\/lib\/validate\.js/
      },
      node: {
        console: true,
        fs: 'empty',
        net: 'empty',
        tls: 'empty'
      }
    }
  }
}

>All comments

Found how to solve this issue by adding webpack.extra inside nwb.config.js after reading the Configuration documentation: https://github.com/insin/nwb/blob/master/docs/Configuration.md#extra-object

module.exports = {
  ...
  webpack: {
    extra: {
      module: {
        noParse: /node_modules\/json-schema\/lib\/validate\.js/
      },
      node: {
        console: true,
        fs: 'empty',
        net: 'empty',
        tls: 'empty'
      }
    }
  }
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

pedrocostadev picture pedrocostadev  路  5Comments

insin picture insin  路  3Comments

ernieyang09 picture ernieyang09  路  3Comments

BurntCaramel picture BurntCaramel  路  4Comments

ivanasetiawan picture ivanasetiawan  路  5Comments