Next 14 causes runtime errors
Unanswered
Mugger Crocodile posted this in #help-forum
Mugger CrocodileOP
file:///var/task/node_modules/swr/_internal/dist/index.mjs:1
import React, { useEffect, useLayoutEffect, createContext, useContext, useMemo, useRef, createElement } from 'react';
^^^^^^^^^^^^^
SyntaxError: Named export 'createContext' not found. The requested module 'react' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'react';
const { useEffect, useLayoutEffect, createContext, useContext, useMemo, useRef, createElement } = pkg;I'm still on the pages router fwiw.
3 Replies
Mugger CrocodileOP
downgraded back to 13.5.6 and my site is back up 😅
Mugger CrocodileOP
it's only on some pages, i'm not sure what the pattern is
Mugger CrocodileOP
fyi, it's this: https://github.com/vercel/next.js/issues/57582