Skip to content
New issue

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

fix: NextJS 12 Error #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Aviortheking
Copy link

With NextJS 12 there is an error when we start the dev server with the plugin

TypeError: Cannot use 'in' operator to search for 'not' in undefined
    at /home/avior/projects/documentation/node_modules/next-pre-css/index.js:54:12
    at Array.reduce (<anonymous>)
    at /home/avior/projects/documentation/node_modules/next-pre-css/index.js:108:36
    at Array.map (<anonymous>)
    at Object.webpack (/home/avior/projects/documentation/node_modules/next-pre-css/index.js:107:37)
    at Object.getBaseWebpackConfig [as default] (/home/avior/projects/documentation/node_modules/next/dist/build/webpack-config.js:1238:32)
    at async Promise.all (index 0)
    at async Span.traceAsyncFn (/home/avior/projects/documentation/node_modules/next/dist/trace/trace.js:79:20)
    at async Span.traceAsyncFn (/home/avior/projects/documentation/node_modules/next/dist/trace/trace.js:79:20)
    at async HotReloader.start (/home/avior/projects/documentation/node_modules/next/dist/server/dev/hot-reloader.js:328:30)

I fixed it by adding checks to see if the value is undefined or not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant