Next build on Vercel can't find modules
Unanswered
Harlequin posted this in #help-forum
HarlequinOP
I'm trying to deploy a project to Vercel and having issues with it building and unable to find modules (that I can see have been installed).
The app builds fine locally.
I'm running a monorepo setup with pnpm-workspaces.
I have a sites folder, with two application within these (both have their own package.json)
I then have a packages folder, which has common files that are shared between the two applications.
I've set my root directory on Vercel to be my
My install command works and then this is the output ( a snippet of the full thing)
Any help would be greatly appreciated. Been scratching my head on this one.
The app builds fine locally.
I'm running a monorepo setup with pnpm-workspaces.
I have a sites folder, with two application within these (both have their own package.json)
I then have a packages folder, which has common files that are shared between the two applications.
I've set my root directory on Vercel to be my
sites/main folder.My install command works and then this is the output ( a snippet of the full thing)
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry
▲ Next.js 14.1.0
- Experiments (use at your own risk):
· missingSuspenseWithCSRBailout
Creating an optimized production build ...
Failed to compile.
../../packages/components/blocks/BlockAccordion/BlockAccordion.tsx:10:0
Module not found: Can't resolve '@portabletext/react'
9 | import { BlockAccordionProps } from '@/sanity/queries/blocks/accordion';
> 10 | import { PortableText, toPlainText } from '@portabletext/react';
11 | import { PortableTextBlock } from 'sanity';
12 | import { FAQPageJsonLd } from 'next-seo';
13 |
https://nextjs.org/docs/messages/module-not-found
../../packages/components/blocks/BlockAccordion/BlockAccordion.tsx:12:0
Module not found: Can't resolve 'next-seo'
10 | import { PortableText, toPlainText } from '@portabletext/react';
11 | import { PortableTextBlock } from 'sanity';Any help would be greatly appreciated. Been scratching my head on this one.