Webform returns undefined in an installation

I just created a new bench and install erpnext and a customapp on a site.
The customapp have webform I previously created in other site (in other bench).

But when visiting the webform page, the page is not displayed (just a blank browser page - no navbar, no footer, nothing).
In the browser console there is error:

TypeError: undefined is not an object (evaluating 'frappe.web_form')

In the console when I type frappe. it doesn’t show autocomplete web_form or web_form_list.

The js script related to this webform is in the appname/modulname/web_form/formname/formname.js and have it hooked in web_form_include_js in hooks.js:

frappe.ready(function() {
    frappe.web_form.after_load = () => {       #this is the error msg refer to.

The same script runs in the old installation.

What and where should I check to see the mistake?
Thank you.

I use Frappe version 12.18.0 and ERPNext version 12.21.0

Did you fix it?

I don’t really remember… sorry
Usually if this is a new install, I just reinstall.