Open huumn opened 15 hours ago
Wild guess, but maybe it's related to relative paths which are different in the production build?
That would make sense. I just don't know where the relative path is coming from.
This is due to the way the code gets the absolute path of the protobuf files
const lightningModulePath = req.resolve('lightning')
const pathForProto = proto => join(lightningModulePath, protosDir, proto)
likely webpacks does some module mangling in production to remove unused code and somehow we end up without this module that is needed at runtime.
~~Imo we need to revert back to the privoxy workaround or fully fork the ln-service and lightning repos. The latter is very hard to do in a maintenable way, because the original repos don't even tag releases...~~
I've come up with a workaround https://github.com/stackernews/stacker.news/pull/1548 , but i can't test it fully in the dev environment.
I suspect this is caused by #1521 given
lib/lnd.js
didn't exist before then.This is going to be tricky to reproduce in dev, but it'll require getting an
npm run build
going then attempting to run it.