live_vue
live_vue copied to clipboard
SSR error - Cannot find module './vue/server.mjs'
Reproduction
Ensure you run mix assets.build before and there's a file in priv/vue/server.mjs. Then, set ssr_module: LiveVue.SSR.NodeJS in your config and try visiting a page with server-side rendered component.
Explanation
It's related to the upstream package nodejs not supporting importing ESM modules. I've added support for it, waiting for maintainers to merge and release the new version.
You can track PR here: https://github.com/revelrylabs/elixir-nodejs/pull/84
Workaround
Add in your mix.exs deps:
{:nodejs, github: "Valian/elixir-nodejs", branch: "master", override: true}
Update - there was some activity in the nodejs repo. My PR was rebased and ready to be merged. Hopefully soon ❤️
It's done! Everything should be working smoothly with nodejs ~> 3.1 🎉
Could you please update dependency version? It still points to the ~> 2.0.
Ouch, sure! I'll do it in a moment
@vheathen 0.3.9 has been published with corrected dependency ❤️
@Valian thanks a lot!