Created
November 20, 2017 19:26
-
-
Save davecan/2fad72e8d854b0b70f85e8a7af3971ed to your computer and use it in GitHub Desktop.
Windows WSL Ubuntu npm webpack CSS error fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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