# Could not find module 'handlebars' imported from 'discourse-common/lib/raw-handlebars'

**URL:** <https://meta.discourse.org/t/could-not-find-module-handlebars-imported-from-discourse-common-lib-raw-handlebars/216999>\
**Category:** Self-hosting\
**Created:** [February 3, 2022, 4:45pm UTC](https://meta.discourse.org/t/could-not-find-module-handlebars-imported-from-discourse-common-lib-raw-handlebars/216999 "2022-02-03T16:45:26Z")\
**Posts on this page:** 9\
**Page:** 1

## AI-generated summary

A user encountered a `Could not find module 'handlebars'` error after installing two plugins, resulting in a blank browser window during rebuild. The issue was identified as a bug in Discourse core, which was fixed in a recent commit. The user was advised to rebuild the app or visit `/admin/upgrade`, which resolved the problem. Another user experienced a similar issue on a site running Discourse 2.9.0.beta2, suspecting the error was triggered by an ember-cli update during a plugin upgrade via `docker_manager`. The issue was resolved by reverting to a previous container state, suggesting the rebuild may have inadvertently enabled ember-cli.

<div class="post-metadata">

**Author:** ![Alex\_Mayo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alex_mayo/32/248663_2.png) [@Alex\_Mayo](https://meta.discourse.org/u/Alex_Mayo)\
**Post date:** [February 3, 2022, 4:45pm UTC](https://meta.discourse.org/t/could-not-find-module-handlebars-imported-from-discourse-common-lib-raw-handlebars/216999/1 "2022-02-03T16:45:26Z")

</div>

Hi,

My forum was working just fine until I tried to add two plugins…

- git clone [GitHub - discourse/discourse-solved: Allow accepted answers on topics · GitHub](https://github.com/discourse/discourse-solved.git)
- git clone [GitHub - discourse/discourse-spoiler-alert: A plugin for discourse to hide spoilers behind the spoiler-alert jQuery plugin · GitHub](https://github.com/discourse/discourse-spoiler-alert.git)

Ever since, when I rebuild (which takes 40 minutes by the way!) I receive a blank browser window, and the below console error.

```plaintext
Uncaught Error: Could not find module `handlebars` imported from `discourse-common/lib/raw-handlebars`
    c _vendor-f4425d4b17932067d5c6d206656c04d9.js:22
    c _vendor-f4425d4b17932067d5c6d206656c04d9.js:22
    findDeps _vendor-f4425d4b17932067d5c6d206656c04d9.js:34
    c _vendor-f4425d4b17932067d5c6d206656c04d9.js:22
    findDeps _vendor-f4425d4b17932067d5c6d206656c04d9.js:34
    c _vendor-f4425d4b17932067d5c6d206656c04d9.js:22
    requireModule _vendor-f4425d4b17932067d5c6d206656c04d9.js:16
    <anonymous> _start-discourse-81637605c9aa837e31086f280d3afdaa.js:18
    <anonymous> _start-discourse-81637605c9aa837e31086f280d3afdaa.js:16
    <anonymous> _start-discourse-81637605c9aa837e31086f280d3afdaa.js:7
_vendor-f4425d4b17932067d5c6d206656c04d9.js:22:30
    c _vendor-f4425d4b17932067d5c6d206656c04d9.js:22
    c _vendor-f4425d4b17932067d5c6d206656c04d9.js:22
    findDeps _vendor-f4425d4b17932067d5c6d206656c04d9.js:34
    c _vendor-f4425d4b17932067d5c6d206656c04d9.js:22
    findDeps _vendor-f4425d4b17932067d5c6d206656c04d9.js:34
    c _vendor-f4425d4b17932067d5c6d206656c04d9.js:22
    requireModule _vendor-f4425d4b17932067d5c6d206656c04d9.js:16
    <anonymous> _start-discourse-81637605c9aa837e31086f280d3afdaa.js:18
    forEach self-hosted:208
    <anonymous> _start-discourse-81637605c9aa837e31086f280d3afdaa.js:16
    <anonymous> _start-discourse-81637605c9aa837e31086f280d3afdaa.js:7

```

 ![image](https://global.discourse-cdn.com/meta/original/3X/6/e/6e322de6baab71e9bdcb5224dbe959f06da56a83.png)

Any help would be much appreciated! I only finished building the forum today, and adding these two plugins has broken it again ☹

---

<div class="post-metadata">

**Author:** ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)\
**Post date:** [February 3, 2022, 5:14pm UTC](https://meta.discourse.org/t/could-not-find-module-handlebars-imported-from-discourse-common-lib-raw-handlebars/216999/2 "2022-02-03T17:14:26Z")

</div>

This was a bug in Discourse core (which has also been affecting Meta over the last few hours). I’ve just pushed a fix:

[https://github.com/discourse/discourse/commit/c985f821746a031a537329bec49c384c52d3fb26](https://github.com/discourse/discourse/commit/c985f821746a031a537329bec49c384c52d3fb26)

If you visit `/admin/upgrade` (or use `launcher rebuild app`), then things should be fixed. Let us know if not.

---

<div class="post-metadata">

**Author:** ![Alex\_Mayo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alex_mayo/32/248663_2.png) [@Alex\_Mayo](https://meta.discourse.org/u/Alex_Mayo)\
**Post date:** [February 3, 2022, 5:22pm UTC](https://meta.discourse.org/t/could-not-find-module-handlebars-imported-from-discourse-common-lib-raw-handlebars/216999/3 "2022-02-03T17:22:26Z")

</div>

Thanks so much. I rebuilt my app twice but nothing happened, then i tried to visit meta and the same error was occuring, so I figured there was something more widespread at play.

Cheers for the speedy reply. ❤

---

<div class="post-metadata">

**Author:** ![Cédric\_Roux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/c%C3%A9dric_roux/32/248659_2.png) [@Cédric\_Roux](https://meta.discourse.org/u/C%C3%A9dric_Roux)\
**Post date:** [February 3, 2022, 5:43pm UTC](https://meta.discourse.org/t/could-not-find-module-handlebars-imported-from-discourse-common-lib-raw-handlebars/216999/4 "2022-02-03T17:43:13Z")

</div>

rebuilding one last time did the trick for me - thanks @david!

---

<div class="post-metadata">

**Author:** ![Alex\_Mayo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alex_mayo/32/248663_2.png) [@Alex\_Mayo](https://meta.discourse.org/u/Alex_Mayo)\
**Post date:** [February 3, 2022, 6:12pm UTC](https://meta.discourse.org/t/could-not-find-module-handlebars-imported-from-discourse-common-lib-raw-handlebars/216999/5 "2022-02-03T18:12:03Z")

</div>

Yep all sorted. Thank you!

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [February 28, 2022, 10:23pm UTC](https://meta.discourse.org/t/could-not-find-module-handlebars-imported-from-discourse-common-lib-raw-handlebars/216999/6 "2022-02-28T22:23:38Z")

</div>

I"m getting this error on a site that’s running:

```
     <meta name="generator" content="Discourse 2.9.0.beta2 - https://github.com/discourse/discourse version effbd6d3e41844afc2cd3ac08a448fe6cfeef43b">

```

 ![image](https://global.discourse-cdn.com/meta/original/3X/1/1/11bd4c3bfa30b54405dc0bc9802d80d9045774b1.png)

The site’s been up for 12 days since the last upgrade.

---

<div class="post-metadata">

**Author:** ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)\
**Post date:** [March 1, 2022, 11:47am UTC](https://meta.discourse.org/t/could-not-find-module-handlebars-imported-from-discourse-common-lib-raw-handlebars/216999/7 "2022-03-01T11:47:18Z")

</div>

Difficult to work out the problem from that screenshot. I guess you reverted the ember-cli update, since the site is currently loading without issue?

I just tried running `bin/ember-cli --proxy "https://community.rstudio.com/"`, and even then it seems to load without errors 🤔

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [March 1, 2022, 2:17pm UTC](https://meta.discourse.org/t/could-not-find-module-handlebars-imported-from-discourse-common-lib-raw-handlebars/216999/8 "2022-03-01T14:17:14Z")

</div>

> [@david](#):
>
> Difficult to work out the problem from that screenshot. I guess you reverted the ember-cli update, since the site is currently loading without issue?

The upgrade (of some plugin) had been done via `docker_manager`, so I destroyed and restarted the container to revert to the older version.

So maybe what happened is that upgrade got ember-cli turned on when it hadn’t been in the last rebuild?

I checked and see that ` EMBER_CLI_PROD_ASSETS: 0` is set in `web_only.yml`. MIght docker manager have done a rebuild with ember-cli turned on?

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [March 31, 2022, 2:17pm UTC](https://meta.discourse.org/t/could-not-find-module-handlebars-imported-from-discourse-common-lib-raw-handlebars/216999/9 "2022-03-31T14:17:24Z")

</div>

Closed on March 31, 2022, 2:17pm UTC

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