Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

watching newly created files #1891

Open

Description

@Deimoslink

Greetings!
When I start node-sass in recursive watching mode it works just fine with the exception that newly created files are not being watched.
For example, if I wach a directory and I add new styles.scss file, node-sass ignores this file, providing the process has already been started before.
Is it possible to change this behavior? Or do I just miss something?

Activity

  1. gaearon commented on Feb 12, 2017

    @gaearon

    I can also reproduce this on OS X Sierra with node-sass@4.5.0.
    My command looks like this:

    node-sass src/ -o src/ --watch --recursive
    

    Adding src/wow.scss (and saving it multiple times) has no effect until I restart the watcher, at which point it works as intended for this file (but not for any new files).

    I also tried removing the --recursive flag but it doesn’t seem to have any effect.

  2. xzyfer commented on Feb 12, 2017

    @xzyfer
    Contributor
  3. xzyfer commented on Feb 12, 2017

    @xzyfer
    Contributor
  4. gaearon commented on Feb 12, 2017

    @gaearon

    Thanks for such a quick response!
    👍

  5. added a commit that references this issue on Feb 13, 2017
    3b0dcc7
  6. self-assigned this
    on Feb 13, 2017
  7. added 3 commits that reference this issue on Feb 14, 2017
    4ce47c4
    68f7df0
    a11a3a8
  8. added a commit that references this issue on Feb 23, 2017
    6172043
  9. NigeNigeNige commented on Feb 28, 2017

    @NigeNigeNige

    I wonder if you could possibly reconsider #1369 at the same time? I believe it would improve consistency across the board.

    With #1369 implemented - all files are guaranteed to be in a compiled state whether they already existed or were created while watching.
    Without it - files that already exist are not compiled. Files that are created while watching are compiled. This seems inconsistent and fiddly to manage.

    Thanks for your consideration.

  10. added 2 commits that reference this issue on Mar 29, 2017
    9ef7993
    2abc8e6
  11. 17 remaining items

  12. adamdonahue commented on Jul 30, 2017

    @adamdonahue

    @xzyfer Even more unfortunate, our existing .scss files, when edited, are no longer compiled into .css. So this is a wonderful fix if you're editing and using .css directly, but if you're using .scss compiled to .css it has the same issue as before and introduces a regression.

    TO BE CLEAR and I should have said this before, we're using create-react-app and so if its configuration needs to change, we haven't yet done that.

  13. kylebebak commented on Nov 1, 2018

    @kylebebak

    This issue was closed but was not actually resolved. I'm running v4.9.4 on OSX 10.12.2 (Sierra) and the problem persists, exactly as described by @gaearon

    node-sass-chokidar doesn't suffer from this issue, at least on my machine. From what I understand the only difference between the two is that nsc uses chokidar instead of Gaze to watch files, but I'm totally out of my depth here.

  14. Friksel commented on Jul 9, 2019

    @Friksel

    This issue was closed but was not actually resolved

    Not resolved in july 2019 either (running Linux), but still 'Closed' on github unfortunately :(

  15. mankinchi commented on Oct 18, 2019

    @mankinchi

    I'm still having this problem, Oct 2019. Running Mac OS Mojave. Please think of reopen this

  16. saper commented on Oct 18, 2019

    @saper
    Member

    @mankinchi can you build a simple repository with a script to demonstrate this?

  17. reopened this on Oct 18, 2019
  18. baglio commented on Jan 8, 2020

    @baglio

    Same problem, January 2020.

  19. diegoulloao commented on Feb 11, 2020

    @diegoulloao

    Same problem, February 2020. Any solution?

  20. t-kowalewski commented on Jul 22, 2020

    @t-kowalewski

    Having exactly the same issue. Using latest node-sass 14.4.1 (July 2020) and Windows 8.1 machine. Still no solution?
    Here is how my command looks like: node-sass sass/main.scss css/style.css -w --recursive

    update: ended up installing node-sass-chokidar and now everything works as it should

  21. Mofunkles commented on Oct 20, 2020

    @Mofunkles

    Also having this exact issue. Thanks @t-kowalewski just swapped to node-sass-chokidar and it's now working fine!

  22. bago2k4 commented on Nov 16, 2020

    @bago2k4

    Same here with Node 12.18.3 and node-sass 4.14.1

  23. pavelee commented on Oct 26, 2023

    @pavelee

    issue still exists :(

    Node 21 and node-sass 9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions