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 on Windows #34

Closed
Svish opened this issue Sep 2, 2018 · 4 comments
Closed

--watch not working on Windows #34

Svish opened this issue Sep 2, 2018 · 4 comments
Assignees
Labels

Comments

@Svish
Copy link

Svish commented Sep 2, 2018

Trying to follow this tutorial about getting started with Riot. Was introduced to --watch, but it doesn't seem to do anything on my machine?

All it does is print out a "Watching" message, but it doesn't even compile the tags to begin with, let alone watch for any changes. I.e. after I run the command, I still have no index.js, and re-saving any files doesn't trigger anything either. 😟

capture

Zipped up code, in case structure has anything to do with it: riot-1.zip


riot-cli:      4.1.0 - https://github.com/riot/cli
riot-compiler: 3.5.1 - https://github.com/riot/compiler
windows:       10, Version 1803
@Svish Svish changed the title Watch doesn't work on Windows? --watch not working on Windows Sep 2, 2018
@GianlucaGuarini
Copy link
Member

can you try with the newest cli version? npm i riot-cli -g

@Svish
Copy link
Author

Svish commented Sep 2, 2018

@GianlucaGuarini Not sure if I'm doing it correctly (also, why isn't riot-cli latest already?), but as far as I can see it's the same result:

capture

@GianlucaGuarini
Copy link
Member

the riot-cli@4 uses still an old chokidar version for the fs.watcher. The riot-cli@5 instead uses the newest chokidar@2 but it's a breaking change that can not land directly in riot@3 so I had to release it separately. I will look into this issue thanks for reporting it

@GianlucaGuarini GianlucaGuarini self-assigned this Sep 2, 2018
GianlucaGuarini added a commit that referenced this issue Sep 2, 2018
@GianlucaGuarini
Copy link
Member

this issue should be fixed in the latest cli versions riot-cli@4.1.1 and riot-cli@5.1.1

GianlucaGuarini added a commit that referenced this issue Apr 20, 2019
* dev: (21 commits)
  added: release notes
  fixes #34
  5.1.0
  updated: unit test and changelog
  Update CHANGELOG.md
  updated: refactor the code in order to export the API.cli function
  updated: remove the isSilent flag for the API export branch
  updated: dependencies and fixed #26
  Wraps by try block and reject on error
  Partially restores to previous code
  Makes it silent always when opt.stdout is true
  Returns promises
  Avoids negative conditions
  Adds tests
  Handles stdin and stdout
  Adds new options: stdin, stdout
  Uncomment the line accidentally commented out in previous commit
  Updates tests
  Adds `prepare` task to npm scripts
  Fixes small lint error
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants