Closed samuelcole closed 9 months ago
error just moves after removing @vercel/analytics
, so it's a general next error
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;
Exact same experience here. Next14 and page router.
E: This seems related https://github.com/vercel/next.js/issues/57582
ah! thanks for the issue link @schnubor, i've been banging my head against it all day :-)
Hey! Yes that seems to be related to https://github.com/vercel/next.js/issues/57582 as mentioned by @schnubor , thanks :) Will close this for now
I just upgraded to Next 14, and
@vercel/analytics
started throwing this error:I'm still on the pages router if that makes a difference.