deep-chat icon indicating copy to clipboard operation
deep-chat copied to clipboard

Build errors when using `pnpm` instead of `npm`

Open avibathula opened this issue 7 months ago • 1 comments

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

avibathula avatar Apr 23 '25 11:04 avibathula

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.

OvidijusParsiunas avatar Apr 23 '25 12:04 OvidijusParsiunas

Closing due to no further communication.

OvidijusParsiunas avatar May 08 '25 13:05 OvidijusParsiunas