open-browser-webpack-plugin
open-browser-webpack-plugin copied to clipboard
Error at the time of loading
Hello,
Webpack is building bundle correctly but the plugin is throwing some error while loading. I am using below config Using node -v : v4.0.0, npm -v : 2.14.2, OS: Ubuntu 15.04
Find the example host here https://github.com/hegdeashwin/learning-webpack/tree/master/codes/example-10
var OpenBrowserPlugin = require('open-browser-webpack-plugin');
module.exports = {
entry: './entry.js',
output: {
filename: 'bundle.js'
},
plugins: [
new OpenBrowserPlugin({
url: 'http://localhost:8080'
})
]
};
$ webpack-dev-server http://localhost:8080/webpack-dev-server/ webpack result is served from / content is served from /media/hegdeashwin/learning-webpack/codes/example-10 Hash: 36b7015096d7fd65d6e4 Version: webpack 1.12.9 Time: 79ms Asset Size Chunks Chunk Names bundle.js 1.74 kB 0 [emitted] main chunk {0} bundle.js (main) 227 bytes [rendered] [0] ./entry.js 167 bytes {0} [built] [1] ./content-1.js 30 bytes {0} [built] [2] ./content-2.js 30 bytes {0} [built] webpack: bundle is now VALID.
/media/hegdeashwin/learning-webpack/node_modules/open-browser-webpack-plugin/index.js:44
if (err) throw err;
^
Error: Command failed: /bin/sh -c /media/hegdeashwin/learning-webpack/node_modules/open-browser-webpack-plugin/node_modules/open/vendor/xdg-open "http://localhost:8080"
/bin/sh: 1: /media/hegdeashwin/My: not found
at ChildProcess.exithandler (child_process.js:203:12)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:817:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:469:12)
This looks like a problem with open package. Try to use https://github.com/pwnall/node-open alone and check if it works for you.
@baldore: Yes! 'node-open' is working for me. Thank you & Merry Christmas