Add the following to your Webpack config:
node: {
fs: "empty"
}
And then add spdx-license-ids package via
npm install spdx-license-ids
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi, I am running node.js on windows and am struggling now for hours with this error. I did install with npm install ... all this modules that seem to be missing. The module folders exist in Laravel project and I installed globally as well. What am I missing?
ERROR in ./node_modules/require-directory/index.js Module not found: Error: Can't resolve 'fs' in 'D:\Xampp\htdocs\project\node_modules require-directory'
ERROR in ./node_modules/spdx-expression-parse/scan.js Module not found: Error: Can't resolve 'spdx-license-ids/deprecated' in 'D:\Xampp \htdocs\project\node_modules\spdx-expression-parse' @ ./node_modules/spdx-expression-parse/scan.js 5:10-48
Please or to participate in this conversation.