Skip to content
This repository has been archived by the owner on Nov 16, 2019. It is now read-only.

Error at the time of loading #4

Open
hegdeashwin opened this issue Dec 25, 2015 · 2 comments
Open

Error at the time of loading #4

hegdeashwin opened this issue Dec 25, 2015 · 2 comments

Comments

@hegdeashwin
Copy link

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)
@baldore
Copy link
Owner

baldore commented Dec 25, 2015

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.

@hegdeashwin
Copy link
Author

@baldore: Yes! 'node-open' is working for me. Thank you & Merry Christmas

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants