# ENOENT no such file or directory error during upgrade

**URL:** <https://meta.discourse.org/t/enoent-no-such-file-or-directory-error-during-upgrade/136802>\
**Category:** Product Support\
**Created:** [December 21, 2019, 11:57pm UTC](https://meta.discourse.org/t/enoent-no-such-file-or-directory-error-during-upgrade/136802 "2019-12-21T23:57:07Z")\
**Posts on this page:** 6\
**Page:** 1

## AI-generated summary

A user encountered an ENOENT error during a forum upgrade, specifically related to a missing file in the assets directory [johncs](/t/-/136802/1). Another user suggested pulling the latest code and rebuilding the app container [pfaffman](/t/-/136802/2). The user confirmed that the data is stored outside the container in `/var/discourse/shared/standalone/postgres_data`, ensuring safety during rebuild [pfaffman](/t/-/136802/4). The rebuild process resolved the issue [johncs](/t/-/136802/5).

<div class="post-metadata">

**Author:** ![johncs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johncs/32/135871_2.png) [@johncs](https://meta.discourse.org/u/johncs)\
**Post date:** [December 21, 2019, 11:57pm UTC](https://meta.discourse.org/t/enoent-no-such-file-or-directory-error-during-upgrade/136802/1 "2019-12-21T23:57:07Z")

</div>

The upgrade process failed and my forum is down unfortunately. Just beginning to dive into the issue, but here’s the error it choked on:

```plaintext
Error: ENOENT: no such file or directory, open 'root='/assets',url='/assets/vendor-4681e47c140b5a5bea2bfb1fec89365858288a8ea0c21979c0167ad9b570ee3d.js.map''
    at Object.openSync (fs.js:443:3)
    at Object.writeFileSync (fs.js:1194:35)
    at done (/usr/lib/node_modules/uglify-js/bin/uglifyjs:516:20)
    at cb (/usr/lib/node_modules/uglify-js/bin/uglifyjs:324:39)
    at /usr/lib/node_modules/uglify-js/bin/uglifyjs:391:9
    at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
rake aborted!

```

Help would be appreciated if you recognize specifically what’s going on.

---

<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:** [December 22, 2019, 12:00am UTC](https://meta.discourse.org/t/enoent-no-such-file-or-directory-error-during-upgrade/136802/2 "2019-12-22T00:00:08Z")

</div>

You might try

```plaintext
cd /var/discourse
git pull
./launcher rebuild app

```

---

<div class="post-metadata">

**Author:** ![johncs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johncs/32/135871_2.png) [@johncs](https://meta.discourse.org/u/johncs)\
**Post date:** [December 22, 2019, 12:05am UTC](https://meta.discourse.org/t/enoent-no-such-file-or-directory-error-during-upgrade/136802/3 "2019-12-22T00:05:31Z")

</div>

`./launcher rebuild` says “Rebuild a container (destroy old, bootstrap, start new)”. Is the forum’s data stored outside of the container? Or will I need to come up from a backup after I run that?

---

<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:** [December 22, 2019, 12:06am UTC](https://meta.discourse.org/t/enoent-no-such-file-or-directory-error-during-upgrade/136802/4 "2019-12-22T00:06:31Z")

</div>

> [@johncs](#):
>
> Is the forum’s data stored outside of the container?

Given that you did a [standard install](https://meta.discourse.org/t/142537?silent=true), it is in `/var/discourse/shared/standalone/postgres_data`. So you’re safe to rebuild.

---

<div class="post-metadata">

**Author:** ![johncs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johncs/32/135871_2.png) [@johncs](https://meta.discourse.org/u/johncs)\
**Post date:** [December 22, 2019, 12:19am UTC](https://meta.discourse.org/t/enoent-no-such-file-or-directory-error-during-upgrade/136802/5 "2019-12-22T00:19:14Z")

</div>

Thanks, rebuilding worked. I’ll remember how to do that, very useful.

---

<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:** [January 21, 2020, 12:23am UTC](https://meta.discourse.org/t/enoent-no-such-file-or-directory-error-during-upgrade/136802/6 "2020-01-21T00:23:35Z")

</div>

Closed on January 21, 2020, 12:23am UTC

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