Skip to content

Instantly share code, notes, and snippets.

@davecan
Created November 20, 2017 19:26
Show Gist options
  • Save davecan/2fad72e8d854b0b70f85e8a7af3971ed to your computer and use it in GitHub Desktop.
Save davecan/2fad72e8d854b0b70f85e8a7af3971ed to your computer and use it in GitHub Desktop.
Windows WSL Ubuntu npm webpack CSS error fix
// When using webpack under WSL Ubuntu the following error will be generated during "npm start":
//
// Error: EINVAL: invalid argument, "index.css" (or similar to this)
//
// This is apparently a bug in how Microsoft implemented the Ubuntu subsystem.
//
// The solution is to add the below code to the very top of the webpack config file. (above the imports is fine)
//
// See: https://github.com/webpack-contrib/extract-text-webpack-plugin/issues/440
try {
require('os').networkInterfaces();
}
catch (e) {
require('os').networkInterfaces = () => ({});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment