# Missing main.js in production mode

**URL:** https://discourse.roots.io/t/missing-main-js-in-production-mode/3515
**Category:** sage
**Created:** 2015-04-14T17:04:16Z
**Posts:** 2

## Post 1 by @nicmare — 2015-04-14T17:04:16Z

I compiled a production version of my theme with “gulp --production”. so i have new files in my dist folder. everything is fine. wordpress loads the new main.css which is now dist/styles/main-a5886f15.css  
there is also a new main.js which is dist/scripts/main-3af671da.js  
But wordpress still expects dist/scripts/main.js  
Why? When i take a look in assets.json, the main.js is missing:

```
{
  "main.css": "main-a5886f15.css",
  "editor-style.css": "editor-style-5a97b810.css"
}
```

what is wrong?  
i added main.js by hand now and then it works:

```
{
  "main.css": "main-a5886f15.css",
  "editor-style.css": "editor-style-5a97b810.css",
  "main.js": "main-3af671da.js"
}
```

but i am sure this can’t be the right solution?!

---

## Post 2 by @ben — 2015-04-14T17:06:50Z

See [https://github.com/roots/sage/issues/1398](https://github.com/roots/sage/issues/1398)

Here’s the fix: [https://github.com/roots/sage/commit/39caa2d391fb4d0fb0e8894517de259bcd6cc5ec](https://github.com/roots/sage/commit/39caa2d391fb4d0fb0e8894517de259bcd6cc5ec)
