After installing the "monaco-editor" package using the command npm i monaco-editor
, I encountered a type error in my source code. Can someone help me understand why this error is happening and how I can resolve it?
This is the package file content:
{
"private": true,
"name": "node-example",
...
}
The error message I'm receiving is:
src/client.ts:32:24 - error TS2345: Argument of type 'import("path/to/project/monaco-languageclient/example/node_modules/monaco-editor/esm/vs/editor/editor.api").editor.IStandaloneCodeEditor' is not assignable to parameter of type 'monaco.editor.IStandaloneCodeEditor'.
Below is the snippet of my full source code that's causing the error:
import { listen, MessageConnection } from 'vscode-ws-jsonrpc';
...