Search code examples
javascriptreactjsnode-opcua

How to import node-opcua to project?


I just want to import 'node-opcua' to my project but it gives me error as follow:

WARNING in ./node_modules/node-opcua-pki/node_modules/yargs/index.js 11:37-44
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

Solution

  • You are getting a warning. The yargs developer recommend to ignore the warnings: https://github.com/yargs/yargs/blob/v15.x.x/docs/webpack.md Add "warningsFilter: [/node_modules/yargs/]" to your webpack configuration