# Cordova Build module.js:472 throw err;

**URL:** <https://discuss.bitrise.io/t/cordova-build-module-js-472-throw-err/416>\
**Category:** Builds\
**Tags:** cordova\
**Created:** [January 24, 2017, 2:39pm UTC](https://discuss.bitrise.io/t/cordova-build-module-js-472-throw-err/416 "2017-01-24T14:39:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kingleroyg](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/kingleroyg/32/136_2.png) [@kingleroyg](https://discuss.bitrise.io/u/kingleroyg)\
**Post date:** [January 24, 2017, 2:39pm UTC](https://discuss.bitrise.io/t/cordova-build-module-js-472-throw-err/416/1 "2017-01-24T14:39:55Z")

</div>

For some reason I keep on getting the following error when doing a cordova build

```
 ionic-app-scripts build "--prod"

module.js:472
    throw err;
    ^

Error: Cannot find module '../dist/index'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/bitrise/src/node_modules/@ionic/app-scripts/bin/ionic-app-scripts.js:19:3)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)

```

Not even sure how to resolve the issue

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [January 24, 2017, 2:47pm UTC](https://discuss.bitrise.io/t/cordova-build-module-js-472-throw-err/416/2 "2017-01-24T14:47:27Z")

</div>

Please check this troubleshooting guide: [How to debug your build locally / "It works on my Mac/PC but not on bitrise.io"](http://discuss.bitrise.io/t/how-to-debug-your-build-locally-it-works-on-my-mac-pc-but-not-on-bitrise-io/392)

And see this Ionic/Cordova setup guide: [How to build Ionic 2 apps](http://discuss.bitrise.io/t/how-to-build-ionic-2-apps/221)

Let us know if you have any questions, or if you can find the cause of the issue!
