monaco-vscode-api: Treemending failing

Trying to setup monaco-vscode-api with pnpm fails to “treemend”

Here are the logs of a clean (removed node_modules folder) install:

$pnpm i

Lockfile is up to date, resolution step is skipped
Packages: +1246
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Packages are hard linked from the content-addressable store to the virtual store.
  Content-addressable store is at: F:\.pnpm-store\v3
  Virtual store is at:             node_modules/.pnpm
Downloading registry.npmjs.org/monaco-editor/0.37.1: 16 MB/16 MB, done
Progress: resolved 1246, reused 1243, downloaded 2, added 1246, done

dependencies:
+ @monaco-editor/react 4.5.1
+ @tauri-apps/api 1.3.0
+ monaco-editor 0.37.1
+ react 18.2.0
+ react-dom 18.2.0
+ react-resizable-panels 0.0.42
+ react-use 17.4.0
+ tauri-plugin-store-api 0.0.0
+ uuid 9.0.0
+ vscode <- @codingame/monaco-vscode-api 1.78.5
+ zustand 4.3.8

devDependencies:
+ @storybook/addon-essentials 7.0.10
+ @storybook/addon-interactions 7.0.10
+ @storybook/addon-links 7.0.10
+ @storybook/addon-styling 1.0.6
+ @storybook/blocks 7.0.10
+ @storybook/react 7.0.10
+ @storybook/react-vite 7.0.10
+ @storybook/testing-library 0.0.14-next.2
+ @types/mocha 10.0.1
+ @types/node 20.1.0
+ @types/react 18.2.6
+ @types/react-dom 18.2.4
+ @types/uuid 9.0.1
+ @types/vscode 1.78.0
+ @typescript-eslint/eslint-plugin 5.59.2
+ @typescript-eslint/parser 5.59.2
+ @vitejs/plugin-react 4.0.0
+ @wdio/cli 8.10.0
+ @wdio/local-runner 8.10.0
+ @wdio/mocha-framework 8.10.0
+ @wdio/spec-reporter 8.10.0
+ autoprefixer 10.4.14
+ eslint 8.40.0
+ eslint-config-prettier 8.8.0
+ eslint-plugin-react-hooks 4.6.0
+ eslint-plugin-react-refresh 0.4.1
+ eslint-plugin-simple-import-sort 10.0.0
+ vite 4.3.5

> @0.0.1 postinstall F:\repos\runts
> monaco-treemending

Error: Unable to apply patch on F:\repos\runts\node_modules\.pnpm\monaco-editor@0.37.1\node_modules\monaco-editor\esm\vs\base\common\paging.js
    at Object.patched (file:///F:/repos/runts/node_modules/.pnpm/@codingame+monaco-vscode-api@1.78.5_monaco-editor@0.37.1_vscode-oniguruma@1.7.0_vscode-textmate@9.0.0_yauzl@2.10.0/node_modules/@codingame/monaco-vscode-api/dist/monaco-treemending.js:854:30)
    at file:///F:/repos/runts/node_modules/.pnpm/@codingame+monaco-vscode-api@1.78.5_monaco-editor@0.37.1_vscode-oniguruma@1.7.0_vscode-textmate@9.0.0_yauzl@2.10.0/node_modules/@codingame/monaco-vscode-api/dist/monaco-treemending.js:820:15
    at Object.loadFile (file:///F:/repos/runts/node_modules/.pnpm/@codingame+monaco-vscode-api@1.78.5_monaco-editor@0.37.1_vscode-oniguruma@1.7.0_vscode-textmate@9.0.0_yauzl@2.10.0/node_modules/@codingame/monaco-vscode-api/dist/monaco-treemending.js:845:21)

The integrity of 1537 files was checked. This might have caused installation to take longer.
Done in 10.3s

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 22 (6 by maintainers)

Most upvoted comments

The alternative way was released: instead of the treemending script, you can now put "monaco-editor": "npm:@codingame/monaco-editor-treemended@<version>" in your dependencies

It may require to force override the version in the overrides section as well to prevent conflict with other libraries having monaco-editor as dependency