im facing this error when trying to use the local api to access globals for my components
i used the create command to install payload into an existing next js react site
Module not found: Can't resolve 'fs'
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | exports.types = exports.setConcurrency = exports.disableTypes = exports.disableFS = exports.imageSize = void 0;
> 4 | const fs = require("fs");
| ^
5 | const path = require("path");
6 | const queue_1 = require("queue");
7 | const index_1 = require("./types/index");
https://nextjs.org/docs/messages/module-not-found
Import trace for requested module:
./node_modules/.pnpm/payload@3.7.0_graphql@16.10.0_monaco-editor@0.52.2_react-dom@19.0.0_react@19.0.0__react@19.0.0_typescript@5.7.2/node_modules/payload/dist/uploads/getImageSize.js
./node_modules/.pnpm/payload@3.7.0_graphql@16.10.0_monaco-editor@0.52.2_react-dom@19.0.0_react@19.0.0__react@19.0.0_typescript@5.7.2/node_modules/payload/dist/uploads/generateFileData.js
./node_modules/.pnpm/payload@3.7.0_graphql@16.10.0_monaco-editor@0.52.2_react-dom@19.0.0_react@19.0.0__react@19.0.0_typescript@5.7.2/node_modules/payload/dist/collections/operations/create.js
./node_modules/.pnpm/payload@3.7.0_graphql@16.10.0_monaco-editor@0.52.2_react-dom@19.0.0_react@19.0.0__react@19.0.0_typescript@5.7.2/node_modules/payload/dist/index.js
./lib/getGlobal.ts
./components/hero.tsx
./app/(app)/page.tsx