How can I resolve this issue?

I want to use Yjs on my backend.

import * as Y from 'yjs';

It works well on my frontend but on my backend, I got this error.

“error”:{“diagnosticCodes”:[2307]},“exception”:true,“level”:“error”,“message”:"uncaughtException: ⨯ Unable to compile TypeScript:\nsrc/controllers/pinata.ts(12,20): error TS2307: Cannot find module ‘yjs’ or its corresponding type declarations.\n\nTSError: ⨯ Unable to compile TypeScript:\nsrc/controllers/pinata.ts(12,20): error TS2307: Cannot find module ‘yjs’ or its corresponding type declarations.\n\n at createTSError (/srv/app/node_modules/ts-node/src/index.ts:859:12)\n

How to resolve this issue?

Apparantly, you forgot to install Yjs / your backend can’t find the Yjs module.

I appreciate when users describe their issues clearly and precisely. With the information you provide, I should be able to reproduce the bug. This is not the case here.

I can’t help as there is too much information missing. What kind of backend are you using? What’s your backend setup?