Ionic服务稍后再试[无法加载index.html]

Sau*_*war 2 ionic-framework

我已经安装了ionic和cordova,但是当我创建一个应用程序并尝试运行它时,我在终端中得到了

ionic-app-scripts serve --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser
[app-scripts] [19:17:47]  ionic-app-scripts 3.1.11 
[app-scripts] [19:17:47]  watch started ... 
[app-scripts] [19:17:47]  build dev started ... 
[app-scripts] [19:17:47]  clean started ... 
[app-scripts] [19:17:47]  clean finished in 3 ms 
[app-scripts] [19:17:47]  copy started ... 
[app-scripts] [19:17:47]  deeplinks started ... 
[app-scripts] [19:17:47]  copy finished in 13 ms 
[app-scripts] [19:17:47]  deeplinks finished in 14 ms 
[app-scripts] [19:17:47]  transpile started ... 
[app-scripts] [19:17:52]  transpile finished in 5.34 s 
[app-scripts] [19:17:52]  preprocess started ... 
[app-scripts] [19:17:52]  preprocess finished in less than 1 ms 
[app-scripts] [19:17:52]  webpack started ... 
[app-scripts] [19:17:58]  webpack finished in 6.42 s 
[app-scripts] [19:17:58]  sass started ... 
[app-scripts] Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.
[app-scripts] [19:18:00]  sass finished in 1.36 s 
[app-scripts] [19:18:00]  postprocess started ... 

[INFO] Development server running!

       Local: http://localhost:8100
       External: http://192.168.0.9:8100
       DevApp: TestApp@8100 on heath

       Use Ctrl+C to quit this process

[INFO] Browser window opened to http://localhost:8100!

[app-scripts] [19:18:00]  watch ready in 13.45 s 
[app-scripts] [19:18:01]  Failed to load index.html 
Run Code Online (Sandbox Code Playgroud)

在浏览器中,我得到“稍后重试”。我该如何解决?

小智 6

我的系统使用以下规格存在相同的错误:

$ ionic info
? Gathering environment info - done!
[WARN] You are not in an Ionic project directory. Project context may be missing.

Ionic:

   ionic (Ionic CLI) : 4.1.2

System:

   NodeJS : v8.11.4
   npm    : 5.6.0
   OS     : macOS High Sierra
Run Code Online (Sandbox Code Playgroud)

我通过在项目文件夹中运行以下命令来解决此问题:

npm install
Run Code Online (Sandbox Code Playgroud)