Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploying on Vercel - Type error: Cannot find module '@sanity/document-internationalization' or its corresponding type declarations. #86

Open
diffTed opened this issue Dec 3, 2022 · 0 comments

Comments

@diffTed
Copy link

diffTed commented Dec 3, 2022

Trying to deploy to vercel I'm getting an error, eslint is not happy that document-internationalization is not installed. But as per documentation is installed in the studio folder. Do I need to install document-internationalization to the root as well?

nextjs 13 (pages, not app dir)
sanity 3.0
pnpm

Screenshot 2022-12-03 at 18 25 20


Done in 1.3s
--
18:17:44.244 | Detected Next.js version: 13.0.6
18:17:44.250 | Running "pnpm run build"
18:17:44.683 |  
18:17:44.683 | > [email protected] build /vercel/path0
18:17:44.683 | > next build
18:17:44.683 |  
18:17:45.173 | info  - Linting and checking validity of types...
18:17:48.935 | Failed to compile.
18:17:48.935 |  
18:17:48.935 | ./studio/sanity.config.ts:2:38
18:17:48.935 | Type error: Cannot find module '@sanity/document-internationalization' or its corresponding type declarations.
18:17:48.935 |  
18:17:48.935 | 1 \| import {defineConfig} from 'sanity'
18:17:48.936 | > 2 \| import {withDocumentI18nPlugin} from '@sanity/document-internationalization'
18:17:48.936 | \|                                      ^
18:17:48.936 | 3 \| import faqType from './schemas/faq'
18:17:48.936 | 4 \|
18:17:48.936 | 5 \| export default defineConfig({
18:17:48.958 | ELIFECYCLE  Command failed with exit code 1.
18:17:48.975 | Error: Command "pnpm run build" exited with 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant