# PostCSS error with \`{} not supported in Resource transformations\`

**URL:** <https://discourse.gohugo.io/t/postcss-error-with-not-supported-in-resource-transformations/23603>\
**Category:** support\
**Created:** [February 22, 2020, 10:45am UTC](https://discourse.gohugo.io/t/postcss-error-with-not-supported-in-resource-transformations/23603 "2020-02-22T10:45:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![minaminfo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/minaminfo/32/9118_2.png) [@minaminfo](https://discourse.gohugo.io/u/minaminfo)\
**Post date:** [February 22, 2020, 10:45am UTC](https://discourse.gohugo.io/t/postcss-error-with-not-supported-in-resource-transformations/23603/1 "2020-02-22T10:45:00Z")

</div>

Hi there, I’m simply trying to pass my CSS through postCSS autoprefixer by following way:

```auto
{{ $style := resources.Get "/css/style.css" | resources.PostCSS (dict "use" "autoprefixer" "noMap" false) }}

```

But I’m getting following error – just last line of error:

> Rebuild failed:  
> … \<resources.PostCSS\>: error calling PostCSS: type map[string]interface {} not supported in Resource transformations

Is I’m doing something wrong here? I tried removing `"noMap" true` or to `"noMap" false` but same error.

**Technical info** Hugo Static Site Generator v0.63.1/extended linux/amd64 BuildDate: unknown

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [February 22, 2020, 12:06pm UTC](https://discourse.gohugo.io/t/postcss-error-with-not-supported-in-resource-transformations/23603/2 "2020-02-22T12:06:50Z")

</div>

So, the line you posted looks correct … are you sure that is the exact line the error points to?

---

<div class="post-metadata">

**Author:** ![minaminfo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/minaminfo/32/9118_2.png) [@minaminfo](https://discourse.gohugo.io/u/minaminfo)\
**Post date:** [February 22, 2020, 12:35pm UTC](https://discourse.gohugo.io/t/postcss-error-with-not-supported-in-resource-transformations/23603/3 "2020-02-22T12:35:09Z")

</div>

Yes it’s correct as I just copied and pasted it here

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [February 23, 2020, 1:50pm UTC](https://discourse.gohugo.io/t/postcss-error-with-not-supported-in-resource-transformations/23603/4 "2020-02-23T13:50:24Z")

</div>

OK, I just got confused by the same error message, see

> <https://github.com/gohugoio/hugo/issues/6942>
>
> {{ $styles = $styles | resources.ToCSS $options }}
> If $styles is nil, you get this error:
> error calling ToCSS: type map\[string\]interface {} not...

The thing is `resources.Get "/css/style.css"` in your case returns nil (not found).

---

<div class="post-metadata">

**Author:** ![minaminfo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/minaminfo/32/9118_2.png) [@minaminfo](https://discourse.gohugo.io/u/minaminfo)\
**Post date:** [February 23, 2020, 1:56pm UTC](https://discourse.gohugo.io/t/postcss-error-with-not-supported-in-resource-transformations/23603/5 "2020-02-23T13:56:36Z")

</div>

Also keep in mind that in my case I’m using `static` directory.  
My theme directory structure looks like

```auto
archetypes
layouts/
       _defaults
       partials
       shortcodes
static

```

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [February 23, 2020, 2:00pm UTC](https://discourse.gohugo.io/t/postcss-error-with-not-supported-in-resource-transformations/23603/6 "2020-02-23T14:00:13Z")

</div>

> [@minaminfo](#):
>
> I’m using `static` directory.

That does not work, put it inside assets.

---

<div class="post-metadata">

**Author:** ![minaminfo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/minaminfo/32/9118_2.png) [@minaminfo](https://discourse.gohugo.io/u/minaminfo)\
**Post date:** [February 23, 2020, 2:02pm UTC](https://discourse.gohugo.io/t/postcss-error-with-not-supported-in-resource-transformations/23603/7 "2020-02-23T14:02:17Z")

</div>

Oh that’s the problem. TY!
