# 预编译主题时出现未定义方法 \`resolve\_baked\_field\`

**URL:** <https://meta.discourse.org/t/undefined-method-resolve-baked-field-when-precompiling-themes/109618>\
**Category:** Support\
**Created:** [2019年二月20日 06:20 UTC](https://meta.discourse.org/t/undefined-method-resolve-baked-field-when-precompiling-themes/109618 "2019-02-20T06:20:38Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![csmu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/csmu/32/124581_2.png) [@csmu](https://meta.discourse.org/u/csmu)\
**Post date:** [2019年二月21日 08:39 UTC](https://meta.discourse.org/t/undefined-method-resolve-baked-field-when-precompiling-themes/109618/6 "2019-02-21T08:39:11Z")

</div>

Based on the solution another post with a similar issue.

> [@Rebuild fails from theme error, site won't start](https://meta.discourse.org/t/rebuild-fails-from-theme-error-site-wont-start/108713/5):
>
> Ah, it’s possible that the old container was cleaned up when you ran `launcher cleanup` (since it wasn’t running).
> 
> Ok, can you try editing your `app.yml` file, and add this under the `env` section. Make sure the indentation is the same as all the other variables in that section.
> 
> ```plaintext
> DONT_PRECOMPILE_CSS: 1
> 
> ```
> 
> Then try rebuilding again.

I did the following

1. Added `DONT_PRECOMPILE_CSS: 1` to /var/discourse/containers/app.yml
2. `/var/discourse/launcher rebuild app` which worked
3. Selected a default theme in {{host}}/admin/customize/themes … no default theme was selected.
4. Commented out `DONT_PRECOMPILE_CSS: 1` in /var/discourse/containers/app.yml
5. `/var/discourse/launcher rebuild app` again, which worked.

---

_[View the full topic](https://meta.discourse.org/t/undefined-method-resolve-baked-field-when-precompiling-themes/109618)._
