# [sage 10] Target class [assets] does not exist

**URL:** https://discourse.roots.io/t/sage-10-target-class-assets-does-not-exist/18603
**Category:** sage
**Tags:** webpack
**Created:** 2020-07-03T17:19:12Z
**Posts:** 5

## Post 1 by @strarsis — 2020-07-03T17:19:13Z

I try to use the `asset` function in sage 10 as I had in sage 9.  
However, this causes an error message (in a nice new error screen though):

```
Target class [assets] does not exist.
```

---

## Post 2 by @Log1x — 2020-07-03T17:26:54Z

[https://github.com/roots/acorn/blob/master/src/helpers.php#L45-L55](https://github.com/roots/acorn/blob/master/src/helpers.php#L45-L55) (make sure you use the namespace unless you set `'globals' => true` in `config/app.php`)

---

## Post 3 by @strarsis — 2020-07-03T17:34:19Z

Will this be sufficient in the file that should use the `asset()` function?

```
use function Roots\asset;
```

I also require PHP files in the `setup.php` to separate concerns of the theme (e.g. Gutenberg, WooCommerce, Google Fonts, etc).

---

## Post 4 by @strarsis — 2020-07-08T20:30:31Z

Alright, so I found out the reason…  
I replace the translation domain `sage` with the slug of the theme (e.g. `company-theme`),  
however, the usual and quite careless approach of just using search-replace of `'sage'` to `'company-theme'` also changes other code than just the translation domain, hence the theme fails to load afterwards.

---

## Post 5 by @Citvej — 2022-05-14T14:55:50Z

For convenience: The line in question is add\_teme\_support(‘sage’) located in /bootstrap/app.php
