Page_js In Doesn't Seem To Work

I created a page called “Gang Planning” (using ERPNext v12.18.0):

I am trying to add javascript to the page via like so:


page_js = {
    "gang-planning" : [

However, the javascript files do not appear on the page.

I’ve tried a number of things to make them appear, including using the local ERPNext paths (e.g. “/assets/frappe/js/lib/Sortable.min.js”).

This looks right to me. Is there something else I should be doing?

I also found that the js script for webform is not consistent. Some are working in the webform_js and some are not.

Try to put the script in Custom Script and see if they work.

Some are working in the webform_js and some are not.

Can you see any pattern in what works as opposed to what doesn’t?

I’ve read a number of posts about loading javascript, but I’d like to figure out page_js right now, which is what this post is about. I have another post about including javascript on the page itself here: Including ERPNext's Internal Datatable, On A Page

No pattern I can see


Did you find any solutions to make page_js works?

No I have not, although you can see a workaround in my post here.

I manage to attach the js file in the page


In the

page_js = {
“dashboard-view”: “public/js/custom.js”

I have only test on development, but its working
Using version v13.4.0

That’s almost identical to what I did, as you can see from the original post. The only difference is that in my post I used an array, since I needed more than one file. Does page_js not work in v12?