#Nest can't resolve socket module
11 messages · Page 1 of 1 (latest)
Usually this is an error from webpack not ignoring the optional module. So you have a webpack config being used anywhere?
yes indeed this is the detail of the script command:
nest build --webpack --webpackPath webpack-hmr.config.js --watch
can i disable these errors?
Can you show your webpack config?
`const nodeExternals = require('webpack-node-externals');
const { RunScriptWebpackPlugin } = require('run-script-webpack-plugin');
module.exports = function (options, webpack) {
return {
...options,
entry: ['webpack/hot/poll?100', options.entry],
externals: [
nodeExternals({
allowlist: ['webpack/hot/poll?100'],
}),
],
plugins: [
...options.plugins,
new webpack.HotModuleReplacementPlugin(),
new webpack.WatchIgnorePlugin({
paths: [/.js$/, /.d.ts$/],
}),
new RunScriptWebpackPlugin({
name: options.output.filename,
autoRestart: false,
}),
],
};
};
`
i found the solution in this comment https://github.com/nestjs/nest/issues/8857#issuecomment-1001663791
i'm using lerna ( multi package tool )