Reputation: 6052
I've just spun up a new Next.js project (React v 17.0.1). I am attempting to compile and import components from a legacy project. Seeing a few errors getting things to work:
Module not found: Can't resolve 'react/jsx-dev-runtime'
. I have a hunch this may have something to do with the new JSX compiler in React 17.
/** @jsxRuntime classic */
to the top of the file, but i'd prefer to just turn on the classic compiler. Is this possible?Global CSS cannot be imported from files other than your Custom <App>
pages/_app
. However, i'd like to turn this safety feature off, leaving the legacy components as is.classic
JSX compiler instead of the new automatic
one_app
?Upvotes: 2
Views: 6396
Reputation: 6052
This was solved by downgrading the React dependency to 16 in package.json
Upvotes: 1