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

Compilation loop when outputs in the same directory #1845

Closed
milenon opened this issue Dec 24, 2016 · 1 comment
Closed

Compilation loop when outputs in the same directory #1845

milenon opened this issue Dec 24, 2016 · 1 comment

Comments

@milenon
Copy link

milenon commented Dec 24, 2016

Hi,

I'm starting node-sass from terminal with the following options:

> node-sass -w -r ./ -o ./

The problem is that when it compiles the changed .scss file and outputs it in the same folder it detects that the output .css file is changed and starts the compilation again and starts looping:

=> changed: D:_\my-project\css\login.component.scss
Rendering Complete, saving .css file...
Wrote CSS to D:_\my-project\css\login.component.css
=> changed: D:_\my-project\css\login.component.css
Rendering Complete, saving .css file...
Wrote CSS to D:_\my-project\css\login.component.css
=> changed: D:_\my-project\css\login.component.css
Rendering Complete, saving .css file...
Wrote CSS to D:_\my-project\css\login.component.css
=> changed: D:_\my-project\css\login.component.css
Rendering Complete, saving .css file...
Wrote CSS to D:_\my-project\css\login.component.css
=> changed: D:_\my-project\css\login.component.css
Rendering Complete, saving .css file...
Wrote CSS to D:_\my-project\css\login.component.css
...

Here are the environment details:

>node -p "require('node-sass').info"
node-sass       4.1.1   (Wrapper)       [JavaScript]
libsass         3.4.0   (Sass Compiler) [C/C++]
>npm -v
4.0.2
>node -v
v7.0.0

There were no such issues in version 3.11.2.

@xzyfer
Copy link
Contributor

xzyfer commented Dec 28, 2016

This is unfortunately expected behaviour.

LibSass allows .css to be @imported. This is bug but changing the behaviour would be a significant breaking change. As a result our watcher needs to watch for changes .css because they may be in the import graph.

LibSass will be fixing this bug in their 4.0 release. They must put it off until then because 4.0 will also introduce an offical way to import .css files so there is a way to keep the broken behaviour people are depending on.

For now the work around is to have different input and output directories.

@xzyfer xzyfer closed this as completed Dec 28, 2016
xzyfer added a commit that referenced this issue Apr 16, 2018
This was a non-standared feature in LibSass we had to support. It
is being removed in LibSass 3.6.0.

This prevents people from output their source directory.

See sass/libsass#2611
See #2184
See #2006
See #1933
See #1925
See #1867
See #1845
nschonni pushed a commit to nschonni/node-sass that referenced this issue Jul 9, 2018
This was a non-standared feature in LibSass we had to support. It
is being removed in LibSass 3.6.0.

This prevents people from output their source directory.

See sass/libsass#2611
See sass#2184
See sass#2006
See sass#1933
See sass#1925
See sass#1867
See sass#1845
xzyfer added a commit that referenced this issue Jul 16, 2018
This was a non-standared feature in LibSass we had to support. It
is being removed in LibSass 3.6.0.

This prevents people from output their source directory.

See sass/libsass#2611
See #2184
See #2006
See #1933
See #1925
See #1867
See #1845
xzyfer added a commit that referenced this issue Jul 16, 2018
This was a non-standared feature in LibSass we had to support. It
is being removed in LibSass 3.6.0.

This prevents people from output their source directory.

See sass/libsass#2611
See #2184
See #2006
See #1933
See #1925
See #1867
See #1845
xzyfer added a commit that referenced this issue Nov 7, 2019
This was a non-standared feature in LibSass we had to support. It
is being removed in LibSass 3.6.0.

This prevents people from output their source directory.

See sass/libsass#2611
See #2184
See #2006
See #1933
See #1925
See #1867
See #1845
xzyfer added a commit that referenced this issue Nov 7, 2019
This was a non-standared feature in LibSass we had to support. It
is being removed in LibSass 3.6.0.

This prevents people from output their source directory.

See sass/libsass#2611
See #2184
See #2006
See #1933
See #1925
See #1867
See #1845
xzyfer added a commit that referenced this issue Nov 7, 2019
This was a non-standared feature in LibSass we had to support. It
is being removed in LibSass 3.6.0.

This prevents people from output their source directory.

See sass/libsass#2611
See #2184
See #2006
See #1933
See #1925
See #1867
See #1845
xzyfer added a commit that referenced this issue Nov 8, 2019
This was a non-standared feature in LibSass we had to support. It
is being removed in LibSass 3.6.0.

This prevents people from output their source directory.

See sass/libsass#2611
See #2184
See #2006
See #1933
See #1925
See #1867
See #1845
xzyfer added a commit that referenced this issue Mar 21, 2020
This was a non-standared feature in LibSass we had to support. It
is being removed in LibSass 3.6.0.

This prevents people from output their source directory.

See sass/libsass#2611
See #2184
See #2006
See #1933
See #1925
See #1867
See #1845
saper pushed a commit to saper/node-sass that referenced this issue May 17, 2020
This was a non-standared feature in LibSass we had to support. It
is being removed in LibSass 3.6.0.

This prevents people from output their source directory.

See sass/libsass#2611
See sass#2184
See sass#2006
See sass#1933
See sass#1925
See sass#1867
See sass#1845
jiongle1 pushed a commit to scantist-ossops-m2/node-sass that referenced this issue Apr 7, 2024
Disable error for empty source string on context
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants