- Install dependencies:
yarn install
- Run
yarn dev
- Attempt to visit
http://localhost:3000/admin
- Observe error:
Error: ./node_modules/@payloadcms/ui/dist/elements/TableColumns/buildColumnState.js:5:1
Module not found: Can't resolve '../../exports/client/index.js'
3 | import { fieldIsHiddenOrDisabled, fieldIsID, fieldIsPresentationalOnly, flattenTopLevelFields } from 'payload/shared';
4 | import React from 'react';
> 5 | import { RenderCustomComponent, RenderDefaultCell, SortColumn } from '../../exports/client/index.js';
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6 | import { RenderServerComponent } from '../RenderServerComponent/index.js';
7 | import { filterFields } from './filterFields.js';
8 | export const buildColumnState = args => {
failed to analyse ecmascript module '[project]/node_modules/@payloadcms/ui/dist/exports/client/index.js [app-rsc] (ecmascript)'
Caused by:
- invalid type: string "use client", expected struct SourceMapJson at line 1 column 12
Debug info:
- Execution of <ModuleAssetContext as AssetContext>::process_resolve_result failed
- Execution of apply_module_type failed
- Execution of <EcmascriptModuleAsset as EcmascriptChunkPlaceable>::get_exports failed
- Execution of analyse_ecmascript_module failed
- failed to analyse ecmascript module '[project]/node_modules/@payloadcms/ui/dist/exports/client/index.js [app-rsc] (ecmascript)'
- Execution of <SourceMapReference as GenerateSourceMap>::generate_source_map failed
- invalid type: string "use client", expected struct SourceMapJson at line 1 column 12
https://nextjs.org/docs/messages/module-not-found
at BuildError (http://localhost:3000/_next/static/chunks/node_modules_next_dist_client_46faef._.js:16927:41)
at react-stack-bottom-frame (http://localhost:3000/_next/static/chunks/node_modules_react-dom_82bb97._.js:12388:24)
at renderWithHooks (http://localhost:3000/_next/static/chunks/node_modules_react-dom_82bb97._.js:3402:24)
at updateFunctionComponent (http://localhost:3000/_next/static/chunks/node_modules_react-dom_82bb97._.js:4726:21)
at beginWork (http://localhost:3000/_next/static/chunks/node_modules_react-dom_82bb97._.js:5358:24)
at runWithFiberInDEV (http://localhost:3000/_next/static/chunks/node_modules_react-dom_82bb97._.js:631:20)
at performUnitOfWork (http://localhost:3000/_next/static/chunks/node_modules_react-dom_82bb97._.js:7947:97)
at workLoopSync (http://localhost:3000/_next/static/chunks/node_modules_react-dom_82bb97._.js:7840:40)
at renderRootSync (http://localhost:3000/_next/static/chunks/node_modules_react-dom_82bb97._.js:7823:13)
at performWorkOnRoot (http://localhost:3000/_next/static/chunks/node_modules_react-dom_82bb97._.js:7558:211)
at performWorkOnRootViaSchedulerTask (http://localhost:3000/_next/static/chunks/node_modules_react-dom_82bb97._.js:8386:9)
at MessagePort.performWorkUntilDeadline (http://localhost:3000/_next/static/chunks/node_modules_beb007._.js:1462:64)