Preline should work with Nextjs 15 created from T3 stack
Actual Behavior
Full log:
debug-turbo git:(main) ✗ pnpm run dev
> debug-turbo@0.1.0 dev /Users/rayhung/Dev/debug-turbo
> next dev
⚠ Port 3000 is in use, trying 3001 instead.
▲ Next.js 15.0.3
- Local: http://localhost:3001
- Environments: .env
✓ Starting...
✓ Ready in 1041ms
○ Compiling / ...
⨯ ./src/styles/globals.css.webpack[javascript/auto]!=!./node_modules/.pnpm/next@15.0.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[2]!./node_modules/.pnpm/next@15.0.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[3]!./src/styles/globals.css
ReferenceError: self is not defined
Import trace for requested module:
./src/styles/globals.css.webpack[javascript/auto]!=!./node_modules/.pnpm/next@15.0.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[2]!./node_modules/.pnpm/next@15.0.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[3]!./src/styles/globals.css
./src/styles/globals.css
⨯ ./src/styles/globals.css.webpack[javascript/auto]!=!./node_modules/.pnpm/next@15.0.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[2]!./node_modules/.pnpm/next@15.0.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[3]!./src/styles/globals.css
ReferenceError: self is not defined
Import trace for requested module:
./src/styles/globals.css.webpack[javascript/auto]!=!./node_modules/.pnpm/next@15.0.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[2]!./node_modules/.pnpm/next@15.0.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[3]!./src/styles/globals.css
./src/styles/globals.css
GET / 500 in 1434ms
Summary
Nextjs 15 | ReferenceError: self is not defined
Steps to Reproduce
I create a next js 15 app using https://create.t3.gg/. And then I install Preline following https://preline.co/docs/frameworks-nextjs.html. Then
next dev
error out withReferenceError: self is not defined
.Steps to reproduce:
pnpm i
pnpm run dev
Demo Link
https://github.com/ruizehung/debug-turbo
Expected Behavior
Preline should work with Nextjs 15 created from T3 stack
Actual Behavior
Full log:
Screenshots