You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating from 1.3.5, my application is running node-sass dozens of times when calling tns run (platform/arguments doesn't matter). Upon investigating, I found that the promise within watcher.js would back up due to this, and the application would refresh several times for no reason once the build was complete until it caught up.
Upon further investigation, I found that the chokidar watcher is firing for every .js (its a typescript/angular project) file I have in a symlinked set of folders. I cannot explain why this is happening, but there is an issue open with chokidar:
While I'd prefer a solution where people could have css files in their symlinked files, I think the current behavior is worse than not allowing that. In watcher.js, adding this line to the watcherOptions:
followSymlinks: false,
solves the problem (I have no css in my symlinked files). I was going to create a .PR, but saw that there should be a corresponding issue first, and the other symlink issue was a bit different.
I can also investigate older versions of chokidar or other suggestions, the above was just the simplest to get my app back on track.
Thanks,
James
The text was updated successfully, but these errors were encountered:
Hi, we have released new version of the [email protected] plugin that should fix that faulty behavior. You can give it a try by executing npm i nativescript-dev-sass --save-dev in your project folder.
I just tested and my issue still exists. I've been using a before-watchPatterns hook to leave out the bad files from being watched. Removing that hook and updating my version to 1.6.1 lead to the looping behavior again.
Hi @james-criscuolo , I am sorry to hear that the problem is not resolved on your side. Unfortunately, we cannot reproduce it, so it’s hard to investigate. I have created Angular project, symlinked some plugin directories and synced files without causing the described behavior. It would be great if you can provide us with more steps or sample project to reproduce it. I suggest you log another issue and provide the details there.
Nativescript 4.1.0
nativescript-dev-sass 1.6.0
After updating from 1.3.5, my application is running node-sass dozens of times when calling
tns run
(platform/arguments doesn't matter). Upon investigating, I found that the promise withinwatcher.js
would back up due to this, and the application would refresh several times for no reason once the build was complete until it caught up.Upon further investigation, I found that the chokidar watcher is firing for every .js (its a typescript/angular project) file I have in a symlinked set of folders. I cannot explain why this is happening, but there is an issue open with chokidar:
paulmillr/chokidar#729
While I'd prefer a solution where people could have css files in their symlinked files, I think the current behavior is worse than not allowing that. In watcher.js, adding this line to the
watcherOptions
:solves the problem (I have no css in my symlinked files). I was going to create a .PR, but saw that there should be a corresponding issue first, and the other symlink issue was a bit different.
I can also investigate older versions of
chokidar
or other suggestions, the above was just the simplest to get my app back on track.Thanks,
James
The text was updated successfully, but these errors were encountered: