Fork me on GitHub
#shadow-cljs
<
2020-09-05
>
benny05:09:10

any suggestions how to fix shadow getting the wrong IP? (`shadow.cljs.devtools.client.env.server_host`)

thheller08:09:44

@benny wrong IP in which context? react-native?

danielstockton14:09:35

I'm trying to compile a build for aws lambda, which renders a react app server side. Keep getting the error "Runtime.ImportModuleError: Error: Cannot find module 'react'", in logs, which doesn't appear in the frontend build. Anyone know what i'm missing?

danielstockton14:09:59

It's a reagent/re-frame app

thheller16:09:20

@danielstockton looks like you are not copying the node_modules for the lambda. node-script and node-library builds by default do not bundle their dependencies and will delegate to node to provide them. you can post process the output with something like https://github.com/vercel/ncc to make them fully self-contained if you want.

danielstockton16:09:53

Yeah, im not. I guess i need to copy it into the zip before updating function code

danielstockton16:09:14

ncc might be useful, thanks