Referencing a Javascript file without using queue_js_file

This isn’t an answer to your question, but do you get the same error if you use an absolute path? It may well be that the application is rewriting your path, but I’ve often run into problems like this because I mistook how a relative path would be interpreted.

If it works with an absolute path the solution should be pretty easy. If not, it will be more work, and it’s been some time since I’ve diagnosed anything along those lines. I do know that .htaccess files are sometimes a culprit in these issues.