jyceN
jyceN
KKinde
Created by jyceN on 1/29/2024 in #💻┃support
Import error with Kinde TypeScript SDK in Next.js 14 project using PNPM
Hello everyone, I've recently integrated the Kinde auth solution into my Next.js 14 project, utilizing the app directory structure. However, I'm encountering an import error that's proving to be quite a hurdle. The issue arises when I attempt to use the RegisterLink or LoginLink components from the Kinde TypeScript SDK, or when navigating to the login API endpoint directly via http://localhost:3000/api/auth/login?post_login_redirect_url=%2Fdashboard. The error message is as follows:
../../node_modules/.pnpm/@[email protected]/node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/utilities/code-challenge.js
Attempted import error: 'subtle' is not exported from 'uncrypto' (imported as 'subtle').
../../node_modules/.pnpm/@[email protected]/node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/utilities/code-challenge.js
Attempted import error: 'subtle' is not exported from 'uncrypto' (imported as 'subtle').
This leads me to suspect there might be a dependency issue, especially since I'm using PNPM as my package manager. Has anyone else encountered this problem, or does anyone have insights on how to resolve this import error? Any guidance or suggestions would be greatly appreciated. Thank you in advance for your help!
7 replies