Skip to content

Commit dd9a900

Browse files
New error: react imports are undefined or empty objects
1 parent 55873c4 commit dd9a900

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

next.config.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ const nextConfig = {
1414
scrollRestoration: true,
1515
// legacyBrowsers: false,
1616
reactCompiler: true,
17-
staleTimes: {
18-
dynamic: 30,
19-
static: 180,
20-
},
17+
// staleTimes: {
18+
// dynamic: 30,
19+
// static: 180,
20+
// },
2121
},
2222
env: {},
2323
webpack: (config, {dev, isServer, ...options}) => {

src/components/MDX/Sandpack/index.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ const SandpackGlimmer = ({code}: {code: string}) => (
4646
);
4747

4848
export default memo(function SandpackWrapper(props: any): any {
49+
console.log(`\n\n\nprops ${JSON.stringify(props)}`);
50+
console.log(`\n\n\nprops.children ${JSON.stringify(props.children)}`);
51+
console.log(`\n\n\nChildren ${JSON.stringify(Children)}`);
52+
console.log(`\n\n\nSuspense ${JSON.stringify(Suspense)}`);
4953
const codeSnippet = createFileMap(Children.toArray(props.children));
5054

5155
// To set the active file in the fallback we have to find the active file first.

src/pages/[[...markdownPath]].js

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ function reviveNodeOnClient(key, val) {
8888
type = Fragment;
8989
}
9090
return {
91-
$$typeof: Symbol.for('react.element'),
91+
$$typeof: Symbol.for('react.transitional.element'),
9292
type: type,
9393
key: key,
9494
ref: ref,

0 commit comments

Comments
 (0)