Jczhang
Jczhang
CCConvex Community
Created by Jczhang on 12/18/2023 in #support-community
Convex Action build error: could not resolve 'crypto-js'
Hi sorry about this I figured out that after the external pkg fix it should work. The way I was importing "crypto-js" was wrong. This is resolved. And for the addition thoughts I think it should be still useful to share.
8 replies
CCConvex Community
Created by Jczhang on 12/18/2023 in #support-community
Convex Action build error: could not resolve 'crypto-js'
Hi @ian this is helpful thanks you! However I don't have a convex.json file and I tried to create it manually in my next.js project. I tried both to create it under root folder or the ./convex/ folder. But I am still getting the same error (Could not resolve "crypto-js" You can mark the path "crypto-js" as external to exclude it from the bundle, which will remove this error.). My convex.json
{
"node": {
"externalPackages": ["*"] // change to "crypto-js" still doesn't work
}
}
{
"node": {
"externalPackages": ["*"] // change to "crypto-js" still doesn't work
}
}
Additional thoughts: 1. Thanks for this pointer and part of my bad that I never checked this bundling tutorial on docs site. I was checking the "Actions" tab to find solutions. Maybe if possible we can add a link from "Actions" page to the "Bundling" page 2. Regarding web crypto API on default runtime, good suggestion though. I tried AES-GCM there and got a Not Implemented error. Therefore I tried to use node runtime instead. Also using a npm pkg is easier for me to implement the encryption.
8 replies
CCConvex Community
Created by Jczhang on 12/12/2023 in #support-community
Using Clerk OAuth app with Convex? How to setAuth()?
Thank you @Michal Srb I figured this out. I am using Clerk OAuth from backend so cannot really use the provider here (btw on my frontend I also uses clerk convex provider with no problem). I am manually validating the access token from Clerk OAuth now and was able to use a password/apiKey to authenticate with my convex query. Thanks!
3 replies