pedrosavi's avatar

Package working when I run node app.js, but not working when I run laravel mix

Hi,

I tested a package in a simple application node and run normally. But when I run the same package in laravel mix I get this error

WARNING in ./node_modules/bindings/bindings.js 76:22-40
Critical dependency: the request of a dependency is an expression

I try with many packages:

serialport node-wifi local-devices escpos and other

it's been a few days trying and nothing. Someone can help me?

Thanks

0 likes
2 replies
pedrosavi's avatar

This is my code

webpack.mix.js

const mix = require('laravel-mix');

mix
   .js('resources/js/test.js', 'public/js')

    .webpackConfig({
         target: 'node',
   })

test.js

const serialport = require('serialport');

Please or to participate in this conversation.