The server responded with a status of 500

Am getting the error Failed to load resource: the server responded with a status of 500 (Internal Server Error) in my console for files bootstrap.min.js, themify-icons.css, jquery-2.2.4.min.js and others

Is it related to assets files only? Or is it on a special action of a given controller?

I think its related to the files i have included in app.html.eex

`` <script src="<%= static_path(@conn, “/js/bootstrap.min.js”) %>">

``

because if i remove one of them in my code, the error related to the file goes away

Did You try to put the files inside priv/static/js ?

1 Like

no, let me try that

currently i have them in web/static/js

Great. Its solved it

@kokolegorille i had the files in the wrong path

Thanks

Putting files in priv is working, because that is the final destination of bundled files. If it is working, it means your javascript bundler is misconfigured. Because it should take files from where You did put them at first, and bundle them inside priv/

As I use webpack over brunch, I cannot help You if You use it, but You can refer to this post for configuration example.

3 Likes