Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux xdg open:没有可用于打开的方法';http://localhost:8080'_Linux_Extjs_Webpack - Fatal编程技术网

Linux xdg open:没有可用于打开的方法';http://localhost:8080'

Linux xdg open:没有可用于打开的方法';http://localhost:8080',linux,extjs,webpack,Linux,Extjs,Webpack,我有一个新项目。我尝试运行以下命令: npm start 一切正常,但最终我得到一个错误: webpack: Compiled successfully. /home/user/project/node_modules/open-browser-webpack-plugin/index.js:46 if (err) throw err; ^ Error: Command failed: /home/user/project/node_modu

我有一个新项目。我尝试运行以下命令:

npm start
一切正常,但最终我得到一个错误:

webpack: Compiled successfully.
/home/user/project/node_modules/open-browser-webpack-plugin/index.js:46
        if (err) throw err;
                 ^

Error: Command failed: /home/user/project/node_modules/open/vendor/xdg-open "http://localhost:8080"
xdg-open: no method available for opening 'http://localhost:8080'

    at ChildProcess.exithandler (child_process.js:198:12)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:920:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! project@1.0.0 start: `webpack-dev-server --progress --colors`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the project@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/user/.npm/_logs/2017-10-28T11_56_32_483Z-debug.log

通过编辑网页包配置文件,解决了此问题。在那里,我关闭了构建完成后打开浏览器的功能,评论“New OpenBrowserPlugin”,如下所示:

plugins.push(new HtmlWebpackPlugin({
    template: 'index.html',
    hash: true
})/*, new OpenBrowserPlugin({ 
    url: `http://localhost:${port}`
})*/);