wasp-lang / open-saas

A free, open-source SaaS app starter for React & Node.js with superpowers. Full-featured. Community-driven.
https://opensaas.sh
MIT License
8.25k stars 793 forks source link

Error: Cannot find module '@node-rs/argon2-wasm32-wasi' #248

Open dsapoetra opened 3 months ago

dsapoetra commented 3 months ago

Hi there

I tried deploying the apps in fly.io as suggested. But the server keeps crashing with this error in log. FYI, the server works in local without this error:

2024-08-05T23:34:31.860 app[32871562c617e8] mia [info] 🔍 Validating environment variables...

2024-08-05T23:34:32.592 app[32871562c617e8] mia [info] Error: Cannot find module '@node-rs/argon2-wasm32-wasi'

2024-08-05T23:34:32.592 app[32871562c617e8] mia [info] Require stack:

2024-08-05T23:34:32.592 app[32871562c617e8] mia [info] - /app/node_modules/@node-rs/argon2/index.js

Please help, thank you

sodic commented 3 months ago

@infomiho Any idea about this one? Argon sounds like one of the things you were dealing with.

@dsapoetra In the meantime, I can maybe help you out if you're comfortable sharing your project's Zip. You can jump into our discord and share it with me there: https://discord.com/invite/rzdnErX

Martinsos commented 3 months ago

Also posibbly relevant: https://github.com/napi-rs/node-rs/issues/862 .

Martinsos commented 3 months ago

Another user hit this: https://discord.com/channels/686873244791210014/1273962730566717471/1273962730566717471 .

Might be caused by this issue on the oslo side: https://github.com/pilcrowOnPaper/oslo/issues/25 .

infomiho commented 3 months ago

The linked Oslo issue says:

This only seems to be an issue because it's a dependency of an ESM package. It works fine when @node-rs/argon2 etc is installed and imported directly

We are no longer using Oslo but the Argon2d directly since: https://github.com/wasp-lang/wasp/pull/2210

So we might not have this issue with the latest Wasp version.

We are not using Vite for the server - but we are using esbuild for bundling. That could the be next thing to explore.