TypeFox / monaco-components

Monaco Editor and Language Client Wrapper, plus Monaco Editor React Component
MIT License
42 stars 13 forks source link

monaco-treemending with vite and npm #50

Closed ballcoach12 closed 11 months ago

ballcoach12 commented 11 months ago

I used npm create @vite:latest to scaffold a vanilla TS project. After adding a dependency to monaco-editor-wrapper to my package.json file, the monaco-treemending script never shows up in the node_modules/.bin folder, and the monaco-treemending postinstall script fails. Here is my package.json:

{
  "name": "vite-project",
  "private": true,
  "version": "0.0.0",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "tsc && vite build",
    "preview": "vite preview",
    "postinstall": "monaco-treemending"
  },
  "dependencies": {
    "monaco-editor-workers": "^0.43.0",
    "monaco-editor-wrapper": "^3.0.1",
    "monaco-languageclient": "^6.4.6",
    "vscode-languageclient": "^8.1.0"
  },
  "devDependencies": {
    "typescript": "^5.0.2",
    "vite": "^4.4.5"
  }
}

My assumption here is that I'll need to add the @codingame/monaco-vscode-api in order to fix this.

Shouldn't this script come along with the monaco-editor-wrapper node module?

kaisalmen commented 11 months ago

Hi @ballcoach12 the treemending is autiomatically performed by monaco-languageclient on postinstall. There is no need to add it manually.

ballcoach12 commented 11 months ago

Thanks. It was not clear to me which dependencies I need in order to make that work.