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

No compiling when partials (imported files) are stored #17

Open
Lakro opened this issue Feb 19, 2021 · 6 comments
Open

No compiling when partials (imported files) are stored #17

Lakro opened this issue Feb 19, 2021 · 6 comments

Comments

@Lakro
Copy link

Lakro commented Feb 19, 2021

If I have scss-subfiles (_partial.scss) which are imported to the scss-mainfile (style.scss) by @import or @use:

When I work in the subfiles
and store the subfile ...
the compiling does not start.

The plugin only compiles when the mainfile is saved..
Is there a trick to activate it or ist that an issue or missing functionality?

I searched for information about that but could not find a solution. A advice/feedback would be helpful.

br Lakro

@akkumar
Copy link
Contributor

akkumar commented Feb 19, 2021 via email

@Lakro
Copy link
Author

Lakro commented Feb 19, 2021

Thx for your information.
But I am a little bit in worry ...

For local testing I checked out
FAQ: 3 I don't have a global sass installation...

I Installed SASS by npm to
the project folder with
/node_modules (for SASS-Compiler)
/sass (for SASS-Files)

I tried to add the SassBinPath to local workspace in different versions:
node_modules/.bin/sass
/node_modules/.bin/sass
./node_modules/.bin/sass
..node_modules/.bin/sass

I've got everytime the same Error Message:
'Error: ProjectRoot .Sass Binary Path ... does not exist.

Same when I installed SASS by npm direct into the sass dir:
/sass/node_modules

In both cases every try to compile ends with he error message.

Is this my not understanding the FAQ ...
Any hint would be wonderful.

br Lakro

@akkumar
Copy link
Contributor

akkumar commented Feb 20, 2021

Based on your comments above , I assume you are working on linux or a similar *nix variant.

node_modules/.bin/sass

should work.

You can try starting a watcher on a directory and see if it launches a "process" on the bottom right side with the indicator - "Sass Watchers: 1 " .

Let me know what you see so I can help.

@Lakro
Copy link
Author

Lakro commented Feb 20, 2021

Thx for this extremly helpful hint!!!

No. I am using Win10 with local xampp. (Sorry for not adding that.)
But your hint made me to have an additional look into the description away from FAQ where it seemed to me I would have found a complete (and good) description to install...

Just as information for maybe others with similar questions:

Install compiler by npm direct to root project folder
for Windows 10 sass bin path is:
node_modules\\sass\\sass.js

In settings.json to the project that becomes:
"dartsass.sassBinPath": "node_modules\\\\sass\\\\sass.js"

Complete description found in project description
Properties --> dartsass.sassBinPath --> Local Sass Binary Installation
https://github.com/codelios/vscode-dartsass#local-sass-binary-installation

Thank your very much for your help.

br Lakro

@Lakro
Copy link
Author

Lakro commented Feb 20, 2021

Once more an additional hint:

After installing sass compiler globally by npm to get auto compiling work on partial files:

Windows 10:
settings for sass bin path:
node_modules\\sass\\sass.js
as given in the description does not work for me.

But to use the full path seems to work:
C:\Users\[username]\AppData\Roaming\npm\node_modules\sass\sass.js
Same issue as described here: #12

Question: is that an issue with the extension or an problem on the windows system?

Just to complete infos for maybe fixing it:
npm system var is correct set to:
C:\Users\[username]\AppData\Roaming\npm
and sass bin files are placed in:
C:\Users\[username]\AppData\Roaming\npm\node_modules\sass\sass.js

Thank you for your work.

br Lakro

@akkumar
Copy link
Contributor

akkumar commented May 26, 2021

Sorry for the delayed reply as I am catching up on things now.

Question: is that an issue with the extension or an problem on the windows system?

If the full path works and the relative path does not work - it may have something to do with the "current project".

Were you working on "mutliple projects" in vscode . If so - is the scss file you were working on - in the same project as the one that had the sass package installed i.e. - node_modules\\sass\\sass.js ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants