Open alyberty opened 4 years ago
I have encountered the callSiteToString
problem before. It is because JavaScriptCore does not include all the fancy Error
methods that V8 supports and some node modules depend on. I fixed this, coincidentally in 0.7.9, by improving the error polyfill for iOS. You can see if this gets you further.
Thnaks for your input! I think this fixed the specific problem.
But now I am stuck with another Error:
Error: TypeError: _$$_REQUIRE.resolve is not a function.
(In '_$$_REQUIRE.resolve("@node-red/nodes")', '_$$_REQUIRE.resolve' is undefined)
The relevant code line is:
userSettings.coreNodesDir = path.dirname(require.resolve("@node-red/nodes"))
I am also not sure if this is a problem from with LiquidCore or just (what I actually suspect) an incompatibility from metro with node-red. Node-red also tries to iterate over directories within a loaded module, which I doubt metro can handle.
Is it possible to run the LCMicroService without a bundle, but with the folder structure intact?
Hi, I was wondering what would be the best way to run NodeRed on LiquidCore (on iOS). NodeRed is quite a large project, with a lot of dependencies.
I tried it with multiple different settings.
I ran into different problems, which I could not fully remove.
The bundling with metro posed some challanges, but I adapted the require code as good as I could. (requires in try catch, protected terms etc.) The programm still crashed. Then I tried it with ncc, so the required code should be all in one file. I know that the combination of ncc and then metro is not ideal, but from my point of view, it should still work. I couldn't test, if the bundled file would still run, because of the missing LiquidCore module. I again encountered the same problem (but less) with metro, which I fixed again. Out of ideas, I also tried to bundle it with browserify, but also no luck. I also checked for native modules. NodeRed depends optionally on bcrypt, but I made sure it was not installed.
Can you guide me in the right direction to make this work?
I was wondering if LCProcess would be the right way to go here. I"m not sure if this would also allow me to skip the whole metro-bundling step.
I'd appreciate your input on that. Thank you for your time and effort you put into this project, regardless!
Here is also some output of the crash[es]: Maybe someone has more insight into what it could mean.
npm only with entrypoint:
packed with ncc