Skip to content

Runtime errors during SSO Login Page implementation (Step 3) using iblai-js SDK #8

@SatyamReactNative

Description

@SatyamReactNative

Description

I'm encountering multiple runtime errors when implementing Step 3: Create the SSO Login Page using the iblai-js SDK in a Next.js 16.0.3 project with Turbopack.


Error 1: Promise.withResolvers is not a function

  • File: pdf.mjs (from pdfjs-dist)
  • Line: 5763
  • Stack trace includes:
    • ../iblai-js/node_modules/.pnpm/@iblai+web-containers@1.0.0.../pdfjs-dist@4.8.69/node_modules/pdfjs-dist/build/pdf.mjs
    • .next/dev/server/chunks/ssr/[root-of-the-server]...js
    • app/sso-login/page.tsx

This occurs during SSR when the SDK attempts to use Promise.withResolvers(), which is not available in the current Node.js runtime.

Image

Error 2: Cannot read properties of null (reading 'get')

  • File: app/sso-login/page.tsx
  • Line: 14
  • Component: <SsoLogin />

This error occurs when navigating to the SSO login page. It appears the SDK is trying to access a property on a null object, possibly within the SsoLogin component or its props.

Image

Error 3: Missing export from @iblai/iblai-js

When working locally, I cloned the SDK and linked it to my Next.js project:

git clone https://github.com/iblai/iblai-js.git
cd iblai-js
pnpm i
pnpm build

Then I linked it to my Next.js app. However, I get the following error:
// lib/init-data-layer.ts
import { initializeDataLayer } from "@iblai/iblai-js";
// ❌ Module '"@iblai/iblai-js"' has no exported member 'initializeDataLayer'
The export does exist in the source at:
iblai-js/packages/data-layer/src/index.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions