You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Start the application in development or attempt a build (no need to setup anything)
See the logs in the console:
Failed to compile.
../../packages/common/auth/index.ts
Module parse failed: Unexpected token (4:14)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| import db from "@stardust/db";
| import * as authSchema from "@stardust/db/schema/auth";
> import { type BetterAuthPlugin, betterAuth } from "better-auth";
| import { drizzleAdapter } from "better-auth/adapters/drizzle";
| import { nextCookies } from "better-auth/next-js";
Import trace for requested module:
../../packages/common/auth/index.ts
> Build failed because of webpack errors
4:14 is the end of the type keyword.
I tried using ts-loader, which works (showing it's due to .ts) but I wasn't sure if it would interfere with the normal compilation process, and another webpack loader shouldn't be required for this.
Current vs. Expected behavior
Following the steps from the previous section, I expected the middleware to build, but instead it failed.
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.1.0: Thu Oct 10 21:02:45 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T8112
Available memory (MB): 24576
Available CPU cores: 8
Binaries:
Node: 22.10.0
npm: 10.9.0
Yarn: 1.22.19
pnpm: 9.4.0
Relevant Packages:
next: 15.2.0-canary.47 // Latest available version is detected (15.2.0-canary.47).
eslint-config-next: N/A
react: 19.0.0-rc-66855b96-20241106
react-dom: 19.0.0-rc-66855b96-20241106
typescript: 5.5.4
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Middleware
Which stage(s) are affected? (Select all that apply)
next build (local)
Additional context
I tested my app on 15.2.0-canary-47. NodeJS middleware support was introduced in .40, and there weren't any changes relating to normal SSR middleware since that release.
The text was updated successfully, but these errors were encountered:
Link to the code that reproduces this issue
https://github.com/spaceness/stardust/tree/nextjs-canary/apps/web
To Reproduce
4:14 is the end of the type keyword.
I tried using
ts-loader
, which works (showing it's due to .ts) but I wasn't sure if it would interfere with the normal compilation process, and another webpack loader shouldn't be required for this.Current vs. Expected behavior
Following the steps from the previous section, I expected the middleware to build, but instead it failed.
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 24.1.0: Thu Oct 10 21:02:45 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T8112 Available memory (MB): 24576 Available CPU cores: 8 Binaries: Node: 22.10.0 npm: 10.9.0 Yarn: 1.22.19 pnpm: 9.4.0 Relevant Packages: next: 15.2.0-canary.47 // Latest available version is detected (15.2.0-canary.47). eslint-config-next: N/A react: 19.0.0-rc-66855b96-20241106 react-dom: 19.0.0-rc-66855b96-20241106 typescript: 5.5.4 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Middleware
Which stage(s) are affected? (Select all that apply)
next build (local)
Additional context
I tested my app on 15.2.0-canary-47. NodeJS middleware support was introduced in .40, and there weren't any changes relating to normal SSR middleware since that release.
The text was updated successfully, but these errors were encountered: