ses
ses

Reputation: 13352

playframework2 jquery error (jquery.min.map)

When I launch my minimal play2 application I can see an exception in the js console like:

GET http://localhost:9000/assets/javascripts/jquery.min.map 404 (Not Found) 

Why it happens? Is it known issue. I've seen some play-tool-projects on github that has this file there. By default I do not have this file in my "javascripts" folder. Should I?

Upvotes: 2

Views: 2137

Answers (2)

Alexandre Mendes
Alexandre Mendes

Reputation: 119

Try to map of the Assets controller in your conf/routes file.

GET /assets/javascripts/jquery.min.map

For more information read this documentation

Working with public assets

Upvotes: 1

Laz
Laz

Reputation: 181

The source map file maps the minified version of the code against the un-minified version so that you can access the real code while debugging.

The 404 error only appears when using the developer tools. To fix this, just download the correct version of your source map file. Mine for example was:

jquery-1.9.0.min.map

Then rename it to:

jquery.min.map

and move it in the javascripts directory.

Upvotes: 5

Related Questions