Skip to content

Support for turbopack #53

@wmonecke

Description

@wmonecke

Hey there!

It seems I can't get the routes for PropelAuth to compile using --tubopack. This issue seems to also have popped up in Nextjs w Nextauth.

It seems that they fix it with this PR.

Could PropelAuth also plz support turbopack?

EDIT:

i was able to make this work by patching node_modules, would still be great this was part of the package:

diff --git a/node_modules/@propelauth/nextjs/dist/client/index.js b/node_modules/@propelauth/nextjs/dist/client/index.js
index e9e18c2..0181a2f 100644
--- a/node_modules/@propelauth/nextjs/dist/client/index.js
+++ b/node_modules/@propelauth/nextjs/dist/client/index.js
@@ -300,7 +300,7 @@ function toOrgIdToOrgMemberInfo(snake_case) {
 
 // src/client/AuthProvider.tsx
 var import_react2 = __toESM(require("react"));
-var import_navigation = require("next/navigation.js");
+var import_navigation = require("next/navigation");
 
 // src/client/utils.ts
 function hasWindow() {
diff --git a/node_modules/@propelauth/nextjs/dist/client/index.mjs b/node_modules/@propelauth/nextjs/dist/client/index.mjs
index 1b07cc9..3aa01eb 100644
--- a/node_modules/@propelauth/nextjs/dist/client/index.mjs
+++ b/node_modules/@propelauth/nextjs/dist/client/index.mjs
@@ -257,7 +257,7 @@ function toOrgIdToOrgMemberInfo(snake_case) {
 
 // src/client/AuthProvider.tsx
 import React, { useCallback, useEffect, useReducer } from "react";
-import { useRouter } from "next/navigation.js";
+import { useRouter } from "next/navigation";
 
 // src/client/utils.ts
 function hasWindow() {
diff --git a/node_modules/@propelauth/nextjs/dist/server/app-router/index.d.ts b/node_modules/@propelauth/nextjs/dist/server/app-router/index.d.ts
index 5b23ca3..6865641 100644
--- a/node_modules/@propelauth/nextjs/dist/server/app-router/index.d.ts
+++ b/node_modules/@propelauth/nextjs/dist/server/app-router/index.d.ts
@@ -1,4 +1,4 @@
-import { NextRequest } from 'next/server.js';
+import { NextRequest } from 'next/server';
 
 declare class UnauthorizedException extends Error {
     readonly message: string;
diff --git a/node_modules/@propelauth/nextjs/dist/server/app-router/index.js b/node_modules/@propelauth/nextjs/dist/server/app-router/index.js
index 948568a..7d9f425 100644
--- a/node_modules/@propelauth/nextjs/dist/server/app-router/index.js
+++ b/node_modules/@propelauth/nextjs/dist/server/app-router/index.js
@@ -98,9 +98,9 @@ var ConfigurationException = class extends Error {
 };
 
 // src/server/app-router.ts
-var import_navigation = require("next/navigation.js");
-var import_headers = require("next/headers.js");
-var import_server = require("next/server.js");
+var import_navigation = require("next/navigation");
+var import_headers = require("next/headers");
+var import_server = require("next/server");
 
 // src/loginMethod.ts
 function toLoginMethod(snake_case) {
diff --git a/node_modules/@propelauth/nextjs/dist/server/app-router/index.mjs b/node_modules/@propelauth/nextjs/dist/server/app-router/index.mjs
index cf81a6f..5818d08 100644
--- a/node_modules/@propelauth/nextjs/dist/server/app-router/index.mjs
+++ b/node_modules/@propelauth/nextjs/dist/server/app-router/index.mjs
@@ -55,9 +55,9 @@ var ConfigurationException = class extends Error {
 };
 
 // src/server/app-router.ts
-import { redirect } from "next/navigation.js";
-import { cookies, headers } from "next/headers.js";
-import { NextResponse } from "next/server.js";
+import { redirect } from "next/navigation";
+import { cookies, headers } from "next/headers";
+import { NextResponse } from "next/server";
 
 // src/loginMethod.ts
 function toLoginMethod(snake_case) {

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