我正在使用离子与docker,当我尝试执行命令ionic serve时,在浏览器上执行应用程序时出现此错误:
evaluate()
docker file:
root@00209e483f93:/var/www/espaceproold# ionic serve
[INFO] Starting app-scripts server: --port 8100 --p 8100 --livereload-port 35729 --r 35729 --address 0.0.0.0 - Ctrl+C to
cancel
[13:54:41] watch started ...
[13:54:41] build dev started ...
[13:54:41] clean started ...
[13:54:41] clean finished in 7 ms
[13:54:41] copy started ...
[13:54:41] transpile started ...
[13:54:45] transpile finished in 3.50 s
[13:54:45] preprocess started ...
[13:54:45] deeplinks started ...
[13:54:45] deeplinks finished in 47 ms
[13:54:45] preprocess finished in 49 ms
[13:54:45] webpack started ...
[13:54:45] copy finished in 4.10 s
[13:54:55] webpack finished in 10.18 s
[13:54:55] sass started ...
[13:54:57] sass finished in 1.55 s
[13:54:57] postprocess started ...
[13:54:57] postprocess finished in 18 ms
[13:54:57] lint started ...
[13:54:57] build dev finished in 15.37 s
[13:54:57] watch ready in 15.48 s
[13:54:57] dev server running: http://localhost:8100/
[13:54:57] Failed to open the browser: Command failed: xdg-open "http://localhost:8100" /bin/sh: 1: xdg-open: not found
[13:55:00] lint finished in 3.41 s
我的dockerfile有什么问题吗?或者问题是什么? 提前谢谢!
答案 0 :(得分:0)
从ionic documentation开始,您应该使用此选项运行ionic:
--nobrowser,-b | Disable launching a browser
这会阻止ionic serve
尝试启动浏览器来显示您的网站。
此外,您当然不希望在制作中启用live-reload
。你可以使用--nolivereload
。如果您处于开发模式,可以保留live-reload
。