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'
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"]
}
This is my package.json file contents:
{
"name": "project-web",
"private": true,
"scripts": {
"dev": "API_URL=api.sandbox.project-web.com next dev",
"build": "next build",
"export": "next export",
"build:next": "next build && next export -o dist/",
"start": "next start",
"lint:next": "next lint",
"lint": "eslint './**/*.{js,jsx,ts,tsx}' --quiet",
"lint:fix": "eslint './**/*.{js,jsx,ts,tsx}' --fix --quiet",
"slicemachine": "start-slicemachine",
"format": "prettier --write .",
"test": "jest",
"analyze": "ANALYZE=true next build",
"tailwind-config-viewer": "tailwind-config-viewer -o",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"chromatic": "npx chromatic --project-token=chpt_1f9dca6e3c11f4e",
"compile": "tsc"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.86.0",
"@aws-sdk/s3-request-presigner": "^3.86.0",
"@fortawesome/fontawesome-svg-core": "^6.1.1",
"@fortawesome/free-brands-svg-icons": "^6.1.1",
"@fortawesome/free-solid-svg-icons": "^6.1.1",
"@fortawesome/react-fontawesome": "^0.1.18",
"@knocklabs/react-notification-feed": "^0.8.4",
"@metamask/onboarding": "^1.0.1",
"@milkdown/core": "^6.4.1",
"@milkdown/plugin-emoji": "^6.4.1",
"@milkdown/plugin-listener": "^6.4.1",
"@milkdown/plugin-menu": "^6.4.1",
"@milkdown/plugin-tooltip": "^6.4.1",
"@milkdown/preset-gfm": "^6.4.1",
"@milkdown/prose": "^6.4.1",
"@milkdown/react": "^6.4.1",
"@milkdown/theme-tokyo": "^6.4.1",
"@next/bundle-analyzer": "^13.4.2",
"@popperjs/core": "^2.11.6",
"@prismicio/client": "^7.0.1",
"@prismicio/next": "^1.2.1",
"@prismicio/react": "^2.6.2",
"@prismicio/types": "^0.2.8",
"@privy-io/react-auth": "^1.25.1",
"@radix-ui/react-visually-hidden": "1.0.2",
"@snapshot-labs/snapshot.js": "^0.4.18",
"@web3-react/core": "^8.2.0",
"axios": "^0.27.2",
"body-scroll-lock": "^4.0.0-beta.0",
"classnames": "^2.3.2",
"cookie": "^0.5.0",
"date-fns": "^2.29.2",
"debounce": "^1.2.1",
"ethers": "^5.6.5",
"image-trace-loader": "^1.0.2",
"imagemin-svgo": "^9.0.0",
"jsonwebtoken": "^8.5.1",
"jwt-decode": "^3.1.2",
"ksuid": "^3.0.0",
"lqip-loader": "^2.2.1",
"markdown-to-text": "^0.1.1",
"next": "^13.3.1",
"next-compose-plugins": "^2.2.1",
"next-optimized-images": "^2.6.2",
"next-plugin-svgr": "^1.1.1",
"react": "^18.2.0",
"react-click-away-listener": "^2.2.3",
"react-cookie": "^4.1.1",
"react-datepicker": "^4.8.0",
"react-dom": "^18.2.0",
"react-markdown": "^8.0.3",
"react-player": "^2.11.0",
"react-popper": "^2.3.0",
"react-popper-tooltip": "^4.4.2",
"react-responsive-carousel": "^3.2.23",
"react-responsive-masonry": "^2.1.6",
"react-spring": "^9.4.3",
"react-table": "^7.8.0",
"react-tiny-popover": "^7.2.0",
"react-toastify": "^9.1.1",
"react-transition-group": "^4.4.5",
"responsive-loader": "^2.3.0",
"swr": "^1.3.0",
"tailwind-merge": "^1.12.0",
"usehooks-ts": "^2.9.1",
"uuid": "^8.3.2",
"walletlink": "^2.5.0",
"web3-token": "0.2.9",
"webp-loader": "^0.6.0",
"xml-js": "^1.6.11",
"zod": "^3.19.1"
},
"devDependencies": {
"@slicemachine/adapter-next": "^0.2.1",
"@storybook/addon-essentials": "^7.0.12",
"@storybook/addon-interactions": "^7.0.12",
"@storybook/addon-links": "^7.0.12",
"@storybook/addon-styling": "^1.0.0-next.2",
"@storybook/blocks": "^7.0.12",
"@storybook/nextjs": "^7.0.12",
"@storybook/react": "^7.0.12",
"@storybook/testing-library": "^0.0.14-next.2",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@types/debounce": "^1.2.1",
"@types/eslint": "8.4.6",
"@types/imagemin-svgo": "^9.0.1",
"@types/jsonwebtoken": "^8.5.8",
"@types/node": "^17.0.42",
"@types/prettier": "^2.7.0",
"@types/react": "^18.0.12",
"@types/react-datepicker": "^4.4.2",
"@types/react-dom": "^18.0.6",
"@types/react-responsive-masonry": "^2.1.0",
"@types/react-table": "^7.7.12",
"@types/uuid": "^8.3.4",
"autoprefixer": "^10.4.14",
"chromatic": "^6.17.4",
"eslint": "8.6.0",
"eslint-config-next": "^13.3.1",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-storybook": "^0.6.12",
"jest": "^29.0.3",
"jest-environment-jsdom": "^29.0.3",
"msw": "^0.47.2",
"postcss": "^8.4.23",
"prettier": "^2.7.0",
"sass": "^1.49.9",
"slice-machine-ui": "^1.1.1",
"storybook": "^7.0.12",
"storybook-addon-designs": "^7.0.0-beta.2",
"tailwind-config-viewer": "^1.7.2",
"tailwindcss": "^3.3.1",
"tw-colors": "^1.2.6",
"typescript": "^4.7.3"
},
"lint-staged": {
"./**/*.{js,jsx,ts,tsx}": [
"eslint --fix --quiet",
"prettier --write",
"next lint ."
]
},
"version": "",
"readme": "ERROR: No README data found!",
"_id": "project-web@"
}