I am packaging node-red using electron-builder with asar setting true. It works fine except that at the start of application I get this error.
Uncaught Exception:
TypeError: Cannot read property 'forEach' of undefined
at C:\Users\XXXX\AppData\Local\Programs\XXXXXX_client\resources\app.asar\node_modules@node-red\registry\lib\library.js:31:19
at electron/js2c/asar.js:24:28
at processTicksAndRejections (internal/process/task_queues.js:82:9)
After applying the changes for examples to be included, now it moved to different error but same start.
[Window Title]
Error
[Main Instruction]
A JavaScript error occurred in the main process
[Content]
Uncaught Exception:
TypeError: Cannot read property 'forEach' of undefined
at C:\Users\Accellion\AppData\Local\Programs\accellion_automation_client\resources\app\node_modules@node-red\registry\lib\library.js:31:19
at FSReqCallback.oncomplete (fs.js:153:23)
How can I get complete stack trace and log rather than window showing in error? Any idea for that.
well there must be some more files you need to include.... All the library foreach is reporting is that it has been asked to load something that isn't there. I guess you could add some console.log to that library.js file to try to identify what exactly is undefined.