# Dart-sass-embedded path quandary

**URL:** <https://discourse.gohugo.io/t/dart-sass-embedded-path-quandary/33639>\
**Category:** support\
**Created:** [July 1, 2021, 7:33am UTC](https://discourse.gohugo.io/t/dart-sass-embedded-path-quandary/33639 "2021-07-01T07:33:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gridfire](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/gridfire/32/14706_2.png) [@gridfire](https://discourse.gohugo.io/u/gridfire)\
**Post date:** [July 1, 2021, 7:33am UTC](https://discourse.gohugo.io/t/dart-sass-embedded-path-quandary/33639/1 "2021-07-01T07:33:07Z")

</div>

Briefly:  
Attempting to compile Sass with dart-sass-embedded yields “You need dart-sass-embedded in your system $PATH” no matter what I do.

This issue potentially duplicates [Installing dart-sass-embedded](https://discourse.gohugo.io/t/installing-dart-sass-embedded/32468) and [How to use dart sass?](https://discourse.gohugo.io/t/how-to-use-dart-sass/30888). I have reviewed both of those items in some detail, but haven’t been able to arrive at a solution.

Here’s some console matter:

`$ echo $PATH`  
(returns lots of stuff, but including this entry)

> _[snip]_:~/.local/bin/sass\_embedded-beta7:_[snip]_

`$ which dart-sass-embedded`

> ~/.local/bin/sass\_embedded-beta7/dart-sass-embedded

`$ hugo`

> Start building sites …  
> hugo v0.84.2+extended linux/amd64 BuildDate=2021-06-28T15:14:06Z  
> Total in 59 ms  
> Error: Error building site: TOCSS-DART: failed to transform “scss/main.scss” (text/x-scss). You need dart-sass-embedded in your system $PATH.

Any insight on this matter would be most gratefully received.

---

<div class="post-metadata">

**Author:** ![davidsneighbour](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/davidsneighbour/32/24507_2.png) [@davidsneighbour](https://discourse.gohugo.io/u/davidsneighbour)\
**Post date:** [July 1, 2021, 9:06am UTC](https://discourse.gohugo.io/t/dart-sass-embedded-path-quandary/33639/2 "2021-07-01T09:06:27Z")

</div>

“Who” is running `hugo`? Your user or some other user? Maybe add a script that runs `echo $PATH` and then executes `hugo`, so that you see what exactly is in Hugo’s user’s path. Your issue points to the program NOT being in Hugo’s system path.

I am running Hugo too with dart-sass, but I install the Dart SDK (via snap) and then no additional issues come up. I also don’t have a `dart-sass-embedded` in my environment. Maybe go that route?

---

<div class="post-metadata">

**Author:** ![gridfire](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/gridfire/32/14706_2.png) [@gridfire](https://discourse.gohugo.io/u/gridfire)\
**Post date:** [July 1, 2021, 10:26am UTC](https://discourse.gohugo.io/t/dart-sass-embedded-path-quandary/33639/3 "2021-07-01T10:26:51Z")

</div>

Interesting! Thank you for the quick reply.

I don’t see the Dart SDK on [snapcraft](https://snapcraft.io/search?q=dart), so wondering where/how you found it as a snap. I did install the Dart SDK via the regular [.deb package](https://dart.dev/get-dart). That unfortunately didn’t change anything, and the same error is being returned.

I also wrote a little shell script along the lines of:

```auto
echo $PATH
which dart-sass-embedded
hugo

```

As I expected, it returns the same output as when I execute the same commands manually.

I do agree that there is some confusion around which user `hugo` is running under, but given that I’m executing it myself, I would assume that it is running as me, with all the same $PATH juice as any other command gets when I run it.

And so back to square one.  
¯\_(ツ)\_/¯

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [July 1, 2021, 10:44am UTC](https://discourse.gohugo.io/t/dart-sass-embedded-path-quandary/33639/4 "2021-07-01T10:44:57Z")

</div>

How did you install Hugo?

---

<div class="post-metadata">

**Author:** ![gridfire](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/gridfire/32/14706_2.png) [@gridfire](https://discourse.gohugo.io/u/gridfire)\
**Post date:** [July 1, 2021, 11:05am UTC](https://discourse.gohugo.io/t/dart-sass-embedded-path-quandary/33639/5 "2021-07-01T11:05:08Z")

</div>

> [@Dart-sass-embedded path quandary](https://discourse.gohugo.io/t/dart-sass-embedded-path-quandary/33639/4):
>
> How did you install Hugo?

**AHA**

I did `snap install hugo --channel=extended`

I have just removed the snap and reinstalled hugo with the deb package from [Github](https://github.com/gohugoio/hugo/releases). Dartsass is now working.

Thank you for asking the right question. Solved!

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [July 1, 2021, 11:13am UTC](https://discourse.gohugo.io/t/dart-sass-embedded-path-quandary/33639/6 "2021-07-01T11:13:49Z")

</div>

cc: @anthonyfok

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [July 3, 2021, 11:14am UTC](https://discourse.gohugo.io/t/dart-sass-embedded-path-quandary/33639/7 "2021-07-03T11:14:39Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
