我刚刚在 Windows 上使用 JHipster 创建了一个新应用程序。我可以使用“mvn spring-boot:run”很好地运行它。但是,我想自动重新加载页面,因此想使用“grunt serve”。当我运行它时,它开始正常。但是当我在 Chrome 中访问“ http://localhost:3000/ ”时,它只是坐在那里等待服务器连接。我可以访问http://localhost:3001/并查看 BrowserSync,但“当前连接”部分下没有列出任何服务器。
这是我在运行“grunt serve”后看到的输出:
C:\mydev\pmi>grunt serve
Running "clean:server" (clean) task
>> 0 paths cleaned.
Running "wiredep:app" (wiredep) task
Running "wiredep:test" (wiredep) task
Running "ngconstant:dev" (ngconstant) task
Creating module pmiApp at src/main/webapp/scripts/app/app.constants.js...OK
Running "concurrent:server" (concurrent) task
Running "browserSync:dev" (browserSync) task
[BS] [info] Proxying: http://localhost:8080
[BS] Access URLs:
--------------------------------------
Local: http://localhost:3000
External: http://10.255.247.72:3000
--------------------------------------
UI: http://localhost:3001
UI External: http://10.255.247.72:3001
--------------------------------------
[BS] Watching files...
Running "watch" task
Waiting...
我只是从来没有在浏览器中看到任何东西(Chrome 和 Firefox 都没有连接)。
我看到另一个帖子建议我删除我的节点模块目录并使用“npm install”重新安装。我这样做并得到了相同的结果。
今晚我看了一个半小时。昨晚,终于触发了一些东西,它开始工作了。但是今晚我遇到了同样的问题。我不知道昨晚终于让它工作了。昨晚我一直有同样的问题一个小时。
我难住了。