-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Treemending failing #113
Comments
Are you able to provide a minimal repo reproducing the issue? Is it related to pnpm? |
Tried using yarn instead of pnpm, (removed
So it must be the way pnpm handles packages |
@MrMarble doesn't pnpm store the packages centrally and only links them locally? Could explain it. If you ever patched it before you will see the error (that is at least the current behavior with npm) |
will try again clearing the pnpm store so it's like the first install, give me a minute Same result @kaisalmen :
|
@MrMarble thank you. I will try to reproduce this in the upcoming days and think about how we can make the patch process detect that monaco-editor has already been patched. This problem also came up with monaco-langugeclient. |
I've been trying to use the previous version 5.0.1 but I can't get it to work. I've installed the versions listed on the README, using monaco-editor/react and added the imports but I get an error:
here's the code: // eslint-disable-next-line simple-import-sort/imports
import { initialize } from "vscode/services";
// eslint-disable-next-line simple-import-sort/imports
import * as monaco from "monaco-editor";
import getTextMateServiceOverride from "vscode/service-override/textmate";
import MonacoEditor, {
type EditorProps as MonacoEditorProps,
loader,
type Monaco,
} from "@monaco-editor/react";
import { type editor } from "monaco-editor";
import { forwardRef } from "react";
await initialize({
...getTextMateServiceOverride(),
});
loader.config({ monaco }); |
@CGNonofr even with the latest release {
"name": "monaco-languagclient-pnpm",
"dependencies": {
"monaco-languageclient": "6.0.3-next.1",
"vscode": "npm:@codingame/monaco-vscode-api@~1.78.7"
},
"scripts": {
"tester": "monaco-treemending"
}
} I have released a next version of |
Do we have a solution for it? I don't know pnpm at all |
I have installed pnpm for the first time ever today, so I am as close to be an expert on it as you are. 🙂 Only idea I have is to look if |
@MrMarble pnpm related tree-mending issues should be resolved with |
@MrMarble FYI, I added yarn and pnpm verification packages into the |
@CGNonofr do you see a reason to keep this open? |
Not really, it was still looking like an open discussion. If you don't agree, feel free to close it :) |
The issue is probably a monaco-editor version mismatch |
SwaggerEditor@5.0.0-alpha.67 comes with following combo: "monaco-editor": "^0.39.0",
"vscode": "npm:@codingame/monaco-vscode-api@~1.79.6" But yarn lock might be overriding it. @Sruthisreem make sure your yarn lock contains versions above. |
@char0n The yarn lock contains "monaco-editor" : 0.39.0 |
Regarding the |
Regarding the
|
@kaisalmen random idea: Since we now publish tons of package, we can publish an additional one with the patched version of monaco-editor, as an alternative to the treemending script (it would require a npm alias) What do you think? |
@CGNonofr Yes, good idea. That can be the easier alternative for some people. |
The alternative way was released: instead of the treemending script, you can now put It may require to force override the version in the |
Trying to setup monaco-vscode-api with pnpm fails to "treemend"
Here are the logs of a clean (removed node_modules folder) install:
The text was updated successfully, but these errors were encountered: