Bench Build Error After Update to Latest Version

Hello Team,

Let me know how to resolve this error.

HEY! USE SCREEN [frappe@scw-priceless-colden frappe-bench]$ bench build
yarn run v1.16.0
$ FRAPPE_ENV=production node rollup/build.js
Production mode
/home/frappe/frappe-bench/apps/frappe/rollup/build.js:78
        const files_to_concat = Object.keys(get_build_json('frappe'))
                                       ^

TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at concatenate_files (/home/frappe/frappe-bench/apps/frappe/rollup/build.js:78:33)
    at Object.<anonymous> (/home/frappe/frappe-bench/apps/frappe/rollup/build.js:24:1)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Function.Module.runMain (module.js:694:10)
    at startup (bootstrap_node.js:204:16)
    at bootstrap_node.js:625:3
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Hello Team,

Is there any update regarding this.

Try solutions in this link. Error: Cannot find module 'rollup' - #3 by tony1

@netchampfaris can you help on this. Even with above error I got error on console So, Please let me know how to resolve it.

socketio_client.js:19 Uncaught ReferenceError: io is not defined
    at Object.init (socketio_client.js:19)
    at website.js:430
    at website.js:262
    at Array.forEach (<anonymous>)
    at Object.trigger_ready (website.js:261)
    at HTMLDocument.<anonymous> (website.js:404)
    at HTMLDocument.dispatch (jquery.min.js:3)
    at HTMLDocument.r.handle (jquery.min.js:3)
    at Object.trigger (jquery.min.js:4)
    at HTMLDocument.<anonymous> (jquery.min.js:4)

Still got same error. My ERP is also working but I got error in console regarding above socket error.

Any update how to resolve it.

any update

@omar_salama Are you facing this issue with the latest Frappe versions? If so, try bench setup requirements --node and bench build to confirm that your setup is complete.

Hey If you still get error if you have setup everything related to socket then just go to socketio_client.js file into frappe public directory. And replace code with below code and then run bench --build frappe from frappe-bench directory. Your problem would be resolved.

/* if (window.location.protocol == “https:”) {
frappe.socketio.socket = io.connect(frappe.socketio.get_host(port), {secure: true});
}
else if (window.location.protocol == “http:”) {
frappe.socketio.socket = io.connect(frappe.socketio.get_host(port));
}
else */ if (window.location.protocol == “file:”) {
frappe.socketio.socket = io.connect(window.localStorage.server);
}

Thanks