Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--watch not working, the issue is in the tasks-watch.js file, please see my proposed fix. #37

Open
BoHuCB opened this issue Dec 15, 2020 · 1 comment

Comments

@BoHuCB
Copy link

BoHuCB commented Dec 15, 2020

Hello guys,

First, thanks for building this useful tool.

Recently we upgraded to "ngm-cli": "1.0.4" and the --watch doesn't work for us anymore. So I did a little bit of research. Here is what I found.

When use command "ngm build -p src --watch=true --skip-bundles" and save any changes, the application is not automatically built again due to the error below.
image

The issue is caused by this

.then(taskQueue => tasksWatch({project, taskQueue, watch, paths: null}));
. The path passed into tasksWatch is specifically null.

There is another issue with tasks-watch.js file at

task.skip = () => changedModule && i !== changedModule;
.
There are two issues with this code.

  1. The first time the runTasks() runs, changedModule && i !== changedModule is undefined, which means every taks.skip would be undefined.
  2. The file changes, if somehow changedModule is 0. changedModule && i !== changedModule would return the value 0 instead of a boolean value.

I kind of fixed it like screenshot below.
image

@valorkin
Copy link
Member

valorkin commented May 7, 2021

oh my, you should switch to ng-packager or I can give you an access to maintain it
this tool isn't supported or used for a while

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants