We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nextjs 15 | ReferenceError: self is not defined
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 with ReferenceError: self is not defined.
next dev
ReferenceError: self is not defined
Steps to reproduce:
pnpm i
pnpm run dev
https://github.com/ruizehung/debug-turbo
Preline should work with Nextjs 15 created from T3 stack
Full log:
debug-turbo git:(main) ✗ pnpm run dev > [email protected] 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/[email protected][email protected][email protected][email protected]/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[2]!./node_modules/.pnpm/[email protected][email protected][email protected][email protected]/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/[email protected][email protected][email protected][email protected]/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[2]!./node_modules/.pnpm/[email protected][email protected][email protected][email protected]/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/[email protected][email protected][email protected][email protected]/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[2]!./node_modules/.pnpm/[email protected][email protected][email protected][email protected]/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/[email protected][email protected][email protected][email protected]/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[2]!./node_modules/.pnpm/[email protected][email protected][email protected][email protected]/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
The text was updated successfully, but these errors were encountered:
I have the same issue ! Did you find a solution for this now ?
Sorry, something went wrong.
I was able to make it work locally for now by setting the following in tailwindcss.config.js:
plugins: [import('preline/preline.js')],
And then running the next.js application without --turbopack.
--turbopack
This won't work on Vercel though.
same issue here
No branches or pull requests
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
The text was updated successfully, but these errors were encountered: