deep-chat
deep-chat copied to clipboard
Build errors when using `pnpm` instead of `npm`
Hi @OvidijusParsiunas - is it possible to using deep-chat-react in a project that is using pnpm?
I have a very simple nextjs project on the lines of your example server and I am seeing
➜ pnpm run build
> [email protected] build
> next build
▲ Next.js 14.2.28
- Environments: .env.local
Creating an optimized production build ...
✓ Compiled successfully
Linting and checking validity of types ..Failed to compile.
./src/app/chat/page.tsx:3:32
Type error: Cannot find module 'deep-chat/dist/types/interceptors' or its corresponding type declarations.
1 | "use client";
2 |
> 3 | import { RequestDetails } from 'deep-chat/dist/types/interceptors';
| ^
4 | import { redirect } from "next/navigation";
5 | import { useSession } from "next-auth/react";
6 | import { useEffect, useState, useRef } from "react";
Note that the usage of
import { RequestDetails } from 'deep-chat/dist/types/interceptors';
is exactly same as in your example-servers/nextjs/app-router/app/page.tsx
And the error goes away if I switch to using npm
Hi @avibathula.
I have copied the NextJs project in the following directory and have ran pnpm i and pnpm run dev on it. The project was able to start successfully for me. Can you try to clone this repo and do the same.
If it doesn't work, it is likely something to do with your setup.
Closing due to no further communication.