I’m getting the following error in my next.js app
web:dev: Module Not Found | Next.js
web:dev:
web:dev:
web:dev: ⨯ ./node_modules/.pnpm/@nylas+react@1.3.6_@stencil+core@4.27.2_rollup@3.29.5/node_modules/@nylas/react/dist/index-7e7c24f1.js:839:10
web:dev: Module not found: Can’t resolve ‘./’ ‘.entry.js’
I’m doing the following
‘use client’;
import dynamic from ‘next/dynamic’;
import { NylasScheduling } from ‘@nylas/react’;
interface BookingInfo {
primaryParticipant: {
name: string;
email: string;
};
guests: Array<{
name: string;
email: string;
}>;
}
interface SchedulingCalendarProps {
bookingInfo: BookingInfo;
}
const DynamicNylasScheduling = dynamic(() => Promise.resolve(NylasScheduling), {
ssr: false,
});
export function SchedulingCalendar({ bookingInfo }: SchedulingCalendarProps) {
return (
);
}
It looks like you need to use the NylasScheduling component in a client side component and also load it dynamically. If that is correct, I’m unsure how to resolve this