Closed willderazevedo closed 5 years ago
You can't webpack this module as its intended to run server side where NodeJS is fully available. The fs
module it's saying can't be resolved is a built-in NodeJS library (https://nodejs.org/dist/latest-v11.x/docs/api/fs.html)
When I try to build my Laravel project with clamscan running
npm run dev
, i get an error:Module not found: Error: Can't resolve 'child_process'.
So i put in webpackconfig this: node: { child_process: 'empty' }
and i get another error:
Module not found: Error: Can't resolve 'fs'.
Then i put in webpackconfig:
node: { child_process: 'empty', fs: 'empty' }
and i get the error: fs.existsSync is not a function
please tell me whats is going on, and what i have to do