Open paulcpederson opened 6 years ago
pr submitted
I think I may be seeing a related issue. My command:
node-sass --include-path 'node_modules/@salesforce-ux/design-system/scss' --source-map true sass/ -wo app/styles
has started hanging. If I run the same command without the -w
flag it completes correctly. I'm guessing it is trying to compile files outside of the source directory - maybe in the include path?
I'm sorry I can't be more precise here. If you can give me a hint how I can diagnose this more effectively I'm happy to do this.
node -v 8.12.0
npm -v 6.4.1
node-sass 4.9.3 (Wrapper) [JavaScript]
libsass 3.5.4 (Sass Compiler) [C/C++]```
@swervo if you point node-sass
in your package.json
to paulcpederson/node-sass#watch-directory
and npm install again does the command work?
@paulcpederson I tried that. It's the same. I think I am seeing a different problem. Here are the symptoms that I'm seeing with both your version and the node-sass 4.9.3:
node_modules/@salesforce-ux/design-system/scss
) it does complete but it takes about 5 minutes and my fan comes on. So something definitely isn't quite right here but it may not be related to what you're seeing.Apologies if I've taken you off track.
I have a fix for this, will try to pr shortly. It's kind of an edge case, but replication is fairly straight forward.
Assume we have the following file tree:
And
file1
imports the library, like this:We build all the sass files in
src/
with the CLI usingnode-sass src/ -o dist/
. This works correctly. If, we watch for changes and change the files insrc
, it also still works correctly.But if we change
library/include.scss
, the CLI will build a new file atlibrary/include.css
. Then, node-sass will throw an error:Even though it is outside the source directory, it's included in the watched files, and because it doesn't have an underscore preceding it's name, we render it to the default location (right next to itself).
The fix is pretty simple, basically when using a directory for multiple file compilation, when files change, check that they are actually inside the directory before rendering. I added multiple file compilation once upon a time so this is mostly my fault 😬 I'll try to get a pr for this fix in soon.
npm -v
): 6.4.0node -v
): v8.2.1node -p process.versions
):node -p process.platform
): darwinnode -p process.arch
): x64node -p "require('node-sass').info"
):npm ls node-sass
): node-sass@4.9.3