Skip to content

fix: NextJS 12 Error#1

Open
Aviortheking wants to merge 1 commit intoeshinn:mainfrom
tcgdex:Aviortheking-patch-1
Open

fix: NextJS 12 Error#1
Aviortheking wants to merge 1 commit intoeshinn:mainfrom
tcgdex:Aviortheking-patch-1

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