2 added 163 characters in body
source | link

Try :

app/code/Company/Product/view/adminhtml/requirejs-config.js

var config = {

    deps: [
        "Company_Product/js/generateMenu"
    ]

};

app/code/Company/Product/view/adminhtml/web/js/generateMenu.js

define(["jquery"], function($) {
  "use strict";
 //Your code here
});

clean cache

clean var/view_preprocessed content

clean pub/static content

deploy the static content : php bin/magento setup:static-content:deploy -f

Try :

app/code/Company/Product/view/adminhtml/requirejs-config.js

var config = {

    deps: [
        "Company_Product/js/generateMenu"
    ]

};

clean cache

clean var/view_preprocessed content

clean pub/static content

deploy the static content : php bin/magento setup:static-content:deploy -f

Try :

app/code/Company/Product/view/adminhtml/requirejs-config.js

var config = {

    deps: [
        "Company_Product/js/generateMenu"
    ]

};

app/code/Company/Product/view/adminhtml/web/js/generateMenu.js

define(["jquery"], function($) {
  "use strict";
 //Your code here
});

clean cache

clean var/view_preprocessed content

clean pub/static content

deploy the static content : php bin/magento setup:static-content:deploy -f

1
source | link

Try :

app/code/Company/Product/view/adminhtml/requirejs-config.js

var config = {

    deps: [
        "Company_Product/js/generateMenu"
    ]

};

clean cache

clean var/view_preprocessed content

clean pub/static content

deploy the static content : php bin/magento setup:static-content:deploy -f