> next-authkit-example@0.1.0 build /Users/chongshengsun/Downloads/next-authkit-example
> next build
▲ Next.js 14.1.4
- Environments: .env.local
Creating an optimized production build ...
⚠ Compiled with warnings
./node_modules/.pnpm/@workos-inc+node@6.7.0/node_modules/@workos-inc/node/lib/workos.js
A Node.js API is used (process.emitWarning at line: 135) which is not supported in the Edge Runtime.
Learn more: https://nextjs.org/docs/api-reference/edge-runtime
Import trace for requested module:
./node_modules/.pnpm/@workos-inc+node@6.7.0/node_modules/@workos-inc/node/lib/workos.js
./node_modules/.pnpm/@workos-inc+node@6.7.0/node_modules/@workos-inc/node/lib/index.js
./node_modules/.pnpm/@workos-inc+nextjs@0.3.0_next@14.1.4_react-dom@18.2.0_react@18.2.0/node_modules/@workos-inc/nextjs/dist/cjs/workos.js
./node_modules/.pnpm/@workos-inc+nextjs@0.3.0_next@14.1.4_react-dom@18.2.0_react@18.2.0/node_modules/@workos-inc/nextjs/dist/cjs/authkit-callback-route.js
./node_modules/.pnpm/@workos-inc+nextjs@0.3.0_next@14.1.4_react-dom@18.2.0_react@18.2.0/node_modules/@workos-inc/nextjs/dist/cjs/index.js
./node_modules/.pnpm/@workos-inc+node@6.7.0/node_modules/@workos-inc/node/lib/workos.js
A Node.js API is used (process.emitWarning at line: 139) which is not supported in the Edge Runtime.
Learn more: https://nextjs.org/docs/api-reference/edge-runtime
Import trace for requested module:
./node_modules/.pnpm/@workos-inc+node@6.7.0/node_modules/@workos-inc/node/lib/workos.js
./node_modules/.pnpm/@workos-inc+node@6.7.0/node_modules/@workos-inc/node/lib/index.js
./node_modules/.pnpm/@workos-inc+nextjs@0.3.0_next@14.1.4_react-dom@18.2.0_react@18.2.0/node_modules/@workos-inc/nextjs/dist/cjs/workos.js
./node_modules/.pnpm/@workos-inc+nextjs@0.3.0_next@14.1.4_react-dom@18.2.0_react@18.2.0/node_modules/@workos-inc/nextjs/dist/cjs/authkit-callback-route.js
./node_modules/.pnpm/@workos-inc+nextjs@0.3.0_next@14.1.4_react-dom@18.2.0_react@18.2.0/node_modules/@workos-inc/nextjs/dist/cjs/index.js
This error indicates that @workos-inc/node library is using an unsupported Node.js API usage in Edge Runtime.
Could you please investigate this issue and provide guidance on how to resolve it? Is there a way to make the @workos-inc/node library compatible with Next.js's Edge Runtime?
When attempting to build WorkOS's official Next.js example, I encountered the following error during the build process:
This error indicates that @workos-inc/node library is using an unsupported Node.js API usage in Edge Runtime.
Could you please investigate this issue and provide guidance on how to resolve it? Is there a way to make the @workos-inc/node library compatible with Next.js's Edge Runtime?