-
-
Notifications
You must be signed in to change notification settings - Fork 432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: switch to hash @node-rs/argon2 breaks sveltekit production builds #1567
Comments
Tried now other node versions eg. node 18 Any help would be greatly appreciated. |
Is it an issue with Lucia or Oslo? |
Not sure.. if you install: npm i -D @sveltejs/adapter-node switch hash algorithm to: npm run build I am getting same error |
Also running into this issue for what it's worth, but even running locally doesn't work on my end. Currently looking into a work around |
I ve made a mistake in my own project..., let me correct my comment: so at least I have a workaround for the moment. |
Ah so you're using the adapter-node. Is Oslo/Argon installed as a dev dependency? |
Argon is neither listed as dev nor "standard" dependency. |
I'm not really following here. Is it an issue with Oslo or napi-rs? Lucia doesn't have a dependency on the latter |
Its about these imports given in code example on the following page: |
[sveltekit] having same issue here is the errors that i'm receiving : the first : @node-rs/argon2-darwin-x64
the second : @node-rs/bcrypt-darwin-x64
|
@LargatSeif Try adding this to your
|
this worked thanks 🙏 |
Package
lucia
Describe the bug
Latest versions of Lucia are relying upon: import { hash } from "@node-rs/argon2";
That one is breaking npm run build for sveltekit projects.
Please see error below.
node: v20.11.1
/Users/volkerhochstein/projects/node/magic-pull/node_modules/@node-rs/argon2-android-arm-eabi/argon2.android-arm-eabi.node error during build: RollupError: Unexpected character '\u{7f}' at getRollupError (file:///Users/volkerhochstein/projects/node/magic-pull/node_modules/rollup/dist/es/shared/parseAst.js:380:41) at ParseError.initialise (file:///Users/volkerhochstein/projects/node/magic-pull/node_modules/rollup/dist/es/shared/node-entry.js:11172:28) at convertNode (file:///Users/volkerhochstein/projects/node/magic-pull/node_modules/rollup/dist/es/shared/node-entry.js:12914:1
Looks like there is already a corresponding ticket open in node-rs/argon2,
napi-rs/node-rs#816
If I use "old style" to create hash and verification eg:
return await new Argon2id().hash(password);
and remove import for node-rs/argon2 prod build npm task is working
building in dev mode is working without any issue for both hashing solutions
What do you suggest to do, currently I do not know how to work around this ?
Thanks a lot for your support
The text was updated successfully, but these errors were encountered: