Angular Docker热重装在Windows上不起作用 [英] Angular Docker hot reload not working on windows

查看:97
本文介绍了Angular Docker热重装在Windows上不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows的Docker容器中运行新创建的角度应用程序不会在更改时热重新加载该应用程序. 我尝试了 Docker容器不会重新加载Angular应用.

Running a freshly created angular app in a docker container in windows does not hot reload the app on changes. I tried this Docker container doesn't reload Angular app.

但仍然失败,如果我创建映像,然后运行得到的容器:

but keeps failing, if I create the image then run the container I get:

web_1 | npm ERR! enoent ENOENT: no such file or directory, open '/usr/src/app/package.json'

我还尝试了以下文章(适用于Mac,但不适用于Windows):
对Angular应用进行Docker化

I also tried following this article (Works on Mac but not Windows):
Dockerizing an Angular App

我尝试将--poll添加到我的angular.json:

"docker": {
    "poll": 2000
},

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆