Next.js Discord

Discord Forum

Module '"@prismicio/client"' has no exported member 'Content' error on build on Vercel

Unanswered
Birman posted this in #help-forum
Open in Discord
BirmanOP
I am on a Next.js project and when I run npm run build, I don't get any errors, but when my project is trying to get built on Vercel, I get the following error:

Module '"@prismicio/client"' has no exported member 'Content'
This error is odd, because I can definitely see that the file has that exported Content namespace.

This is how I am using that in one of my files:
import { Content } from '@prismicio/client'

1 Reply

BirmanOP
This is my tsconfig.json file contents:
{
  "compilerOptions": {
    "baseUrl": ".",
    "target": "es6",
    "lib": ["dom", "dom.iterable", "esnext"],
    "allowJs": true,
    "skipLibCheck": true,
    "strict": false,
    "forceConsistentCasingInFileNames": true,
    "noEmit": true,
    "incremental": true,
    "esModuleInterop": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "jsx": "preserve",
    "paths": {
      "@/*": ["./*"]
    }
  },
  "include": [
    "next-env.d.ts",
    "react-table-config.d.ts",
    "prismicio-types.d.ts",
    "**/*.ts",
    "**/*.tsx",
    "**/*.css",
    "**.*.js",
    "foundations/*.js",
    "components/*.js",
    "lib/tailwind/colors.js"
  ],
  "exclude": ["node_modules"]
}