# Development Env: No campain map and "TypeError" from the level

**URL:** <https://discourse.codecombat.com/t/development-env-no-campain-map-and-typeerror-from-the-level/4684>\
**Category:** Archmage\
**Created:** [August 13, 2015, 1:53am UTC](https://discourse.codecombat.com/t/development-env-no-campain-map-and-typeerror-from-the-level/4684 "2015-08-13T01:53:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![voq](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/voq/32/2907_2.png) [@voq](https://discourse.codecombat.com/u/voq)\
**Post date:** [August 13, 2015, 1:53am UTC](https://discourse.codecombat.com/t/development-env-no-campain-map-and-typeerror-from-the-level/4684/1 "2015-08-13T01:53:30Z")

</div>

I built the development environment and started the first campaign. But I cannot see the map for the dungeon. I just started the first level and I’m continously getting the following red boxes of error saying from the hero selection screen;

> Error: Uncaught TypeError: Cannot read property ‘apply’ of undefined  
> Check the JS console for more.

Any help? BTW. This same behavior is happening from the Mac OS development environment too.

 ![](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/2X/f/f9edebb5c8b58fdd8732cb16f041bc11938e08fa.png)

---

<div class="post-metadata">

**Author:** ![nick](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/nick/32/784_2.png) [@nick](https://discourse.codecombat.com/u/nick)\
**Post date:** [August 13, 2015, 6:43pm UTC](https://discourse.codecombat.com/t/development-env-no-campain-map-and-typeerror-from-the-level/4684/2 "2015-08-13T18:43:10Z")

</div>

Hmm, that’s no good. Try [opening up the JS console](http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers/77337#77337) and then opening the little triangle in the JS console error message to see what the stack trace is. It should tell you where the error is coming from, and we can try to figure it out.

---

<div class="post-metadata">

**Author:** ![trotod](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/trotod/32/3263_2.png) [@trotod](https://discourse.codecombat.com/u/trotod)\
**Post date:** [August 13, 2015, 8:03pm UTC](https://discourse.codecombat.com/t/development-env-no-campain-map-and-typeerror-from-the-level/4684/3 "2015-08-13T20:03:06Z")

</div>

Seems like `coco.media.chunks` is missing from the database dump.

As for the other error, it may be related to the missing database files (didn’t see on main site), but the stack trace is not helpful at all (something in soundjs, in `createjs.proxy`):

```
Uncaught TypeError: Cannot read property 'apply' of undefined
    (anonymous function) @ soundjs-NEXT.combined.js:211

```

(Speaking of which, it seems like that file hasn’t been updated since last year…)

---

<div class="post-metadata">

**Author:** ![voq](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/voq/32/2907_2.png) [@voq](https://discourse.codecombat.com/u/voq)\
**Post date:** [August 14, 2015, 12:35pm UTC](https://discourse.codecombat.com/t/development-env-no-campain-map-and-typeerror-from-the-level/4684/4 "2015-08-14T12:35:51Z")

</div>

I downloaded the “up to date database dump” from the link in the ‘getting started’ ([http://analytics.codecombat.com:8080/dump.tar.gz](http://analytics.codecombat.com:8080/dump.tar.gz)) And here’s snapshot of console log for someone who is interested 🙂

 ![](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/2X/d/df662e83a57091a7d72c151645230290fd2f79bb.png)

---

<div class="post-metadata">

**Author:** ![nick](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/nick/32/784_2.png) [@nick](https://discourse.codecombat.com/u/nick)\
**Post date:** [August 15, 2015, 6:58pm UTC](https://discourse.codecombat.com/t/development-env-no-campain-map-and-typeerror-from-the-level/4684/5 "2015-08-15T18:58:28Z")

</div>

Oh right, we must have taken out the media chunks at some point, because they made the dump much bigger to download, and usually it’s not too necessary to have some of that stuff when developing locally. Maybe you can add some more error handling in AudioPlayer so that it doesn’t have the `apply` error in SoundJS? (Somewhere in the stack trace, we can probably handle it.)
