Uncaught ReferenceError: using TypeScript, RequireJS and PureMVC

748 Views Asked by At

I got this problem and I couldn't figure out why. I keep getting "ReferenceError: puremvc is not defined"

Can someone take a look? Attached are images of my folder structure, index.html, main.ts and DataProxy.ts and its error.

Here is what my folders structure looks like https://i.stack.imgur.com/xbkRt.jpg

Here is my index.html file https://i.stack.imgur.com/wksks.jpg

1

There are 1 best solutions below

6
Fenton On

Your paths don't look quite right - it looks from your images as if the paths should be:

<script src="/js/lib/puremvc/puremvc-typescript-standard-1.0-min.js"></script>

Note the leading / as it makes all the difference

This makes the URI relative to the root of your site, which means this path would work wherever you placed your index.html in your website.