Run 'npm run dev' failed on Windows 10 Bash(ubuntu) , outputs follows :
> [email protected] dev /root/Projects/wm
> node build/dev-server.js
Listening at http://localhost:8080
webpack: wait until bundle finished: /index.html
webpack built ddc5526ba46e2135f4be in 4698ms
Hash: ddc5526ba46e2135f4be
Version: webpack 1.13.3
Time: 4698ms
Asset Size Chunks Chunk Names
static/img/index_02.777377d.gif 11.9 kB
static/img/qy.1a9f5d5.png 57.1 kB
app.js 3.14 MB 0 app
ERROR in EINVAL: invalid argument, uv_interface_addresses
@ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/style-rewriter.js?id=data-v-923736d4!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/App.vue 4:14-209 13:2-17:4 14:20-215
ERROR in EINVAL: invalid argument, uv_interface_addresses
@ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/style-rewriter.js?id=data-v-24a72e50&scoped=true!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/components/Article.vue 4:14-234 13:2-17:4 14:20-240
Child html-webpack-plugin for "index.html":
Asset Size Chunks Chunk Names
index.html 1.47 MB 0
webpack: bundle is now VALID.
It is a problem with bash: https://github.com/Microsoft/BashOnWindows/issues/468
@stefanosandes So bash on windows is no use now...
The css loader doesn't actually need network interfaces to work. Add this to the top of your webpack config file:
// Hack for Ubuntu on Windows: interface enumeration fails with EINVAL, so return empty.
try {
require('os').networkInterfaces();
} catch (e) {
require('os').networkInterfaces = () => ({});
}
Taken from https://github.com/Microsoft/BashOnWindows/issues/468#issuecomment-241916426.
Windows Bash were updated and this error no longer exists. You can close this issue.
Thx for everyone who answered this issue.
@bruno222 thats not true. The fix is only on Windows Insider builds for now.
https://github.com/Microsoft/BashOnWindows/issues/468#issuecomment-275516458
You're right, hermano.
I just encountered this with a fresh install/update of everything (including Windows), so the fix still hasn't been implemented. Looks like it probably won't be until the Creators Update.
bradstewart's fix worked perfectly.
Most helpful comment
The css loader doesn't actually need network interfaces to work. Add this to the top of your webpack config file:
Taken from https://github.com/Microsoft/BashOnWindows/issues/468#issuecomment-241916426.