Skip to content

Commit

Permalink
fix: Fix version lock issue. fix #216
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Nov 13, 2021
1 parent b98d020 commit b26e854
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@
"react-dom": ">=16.8.0"
},
"dependencies": {
"@babel/runtime": "7.16.3",
"@codemirror/basic-setup": "0.19.0",
"@codemirror/state": "0.19.5",
"@codemirror/theme-one-dark": "0.19.1",
"@codemirror/view": "0.19.15"
"@babel/runtime": "^7.16.3",
"@codemirror/basic-setup": "^0.19.0",
"@codemirror/state": "^0.19.5",
"@codemirror/theme-one-dark": "^0.19.1",
"@codemirror/view": "^0.19.15"
},
"devDependencies": {
"@codemirror/lang-cpp": "0.19.1",
Expand Down

24 comments on commit b26e854

@jaywcjlove
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hodasalah
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hello @jaywcjlove i faced this issue iam using react v18 now i had to down grade @uiw/react-codemirror to v3 but i also faced duplicated editors

@jaywcjlove
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

? ? ? what is the problem?
@hodasalah

@jaywcjlove
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hodasalah

"peerDependencies": {
"@babel/runtime": ">=7.11.0",
"@codemirror/theme-one-dark": ">=6.0.0",
"@codemirror/view": ">=6.0.0",
"codemirror": ">=6.0.0",
"react": ">=16.8.0",
"react-dom": ">=16.8.0"
},

@hodasalah
Copy link

@hodasalah hodasalah commented on b26e854 Sep 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaywcjlove when i install last version of @uiw/react-codemirror i got Error: Unrecognized extension value in extension set ([object Object]). This sometimes happens because multiple instances of @codemirror/state are loaded I tried alot to solve it but I couldn't so I decided to use @uiw/react-codemirror v"^3.2.9" it worked but unfortunately I got 2editors not one
I am using react v18 so I don't know how to solve this problems
So Please What steps should I do to avoid these errors

@jaywcjlove
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hodasalah ⚠️ 3.0 cannot be upgraded to 4.0+

#88 (comment)

@hodasalah
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaywcjlove ok i tried to install last version and i followed documentation but i faced error
Error: Unrecognized extension value in extension set ([object Object]). This sometimes happens because multiple instances of @codemirror/state are loaded
if there are a solution I could remove old version and install newest version

@jaywcjlove
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the command below to see if your version matches. @hodasalah

npm ls @codemirror/view

@jaywcjlove
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hodasalah

"@codemirror/view": ">=6.0.0",
"@codemirror/state": ">=6.0.0",

@hodasalah
Copy link

@hodasalah hodasalah commented on b26e854 Sep 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hello @jaywcjlove
after running npm ls @codemirror/view
i got :
└─┬ @uiw/[email protected]
├─┬ @codemirror/[email protected]
│ └── @codemirror/[email protected] deduped
├─┬ @codemirror/[email protected]
│ └── @codemirror/[email protected] deduped
├── @codemirror/[email protected] deduped
├─┬ @uiw/[email protected]
│ ├─┬ @codemirror/[email protected]
│ │ └── @codemirror/[email protected] deduped
│ └── @codemirror/[email protected] deduped
└─┬ [email protected]
└── @codemirror/[email protected] deduped

@jaywcjlove
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you give me a reproducible example.

@hodasalah

@jaywcjlove
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hodasalah
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
image

@hodasalah
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@hodasalah
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@jaywcjlove
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete node_modules and reinstall to ensure that the version @codemirror/view and @codemirror/state is the same, which basically solves the problem.

You don't give an example and there is no way to troubleshoot the problem for you.

@hodasalah

@hodasalah
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I'll try to give you an example

@hodasalah
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://codesandbox.io/s/laughing-wu-7kbd5z?file=/src/App.js
i tried here it works so please what should i do this is same code in my project

@hodasalah
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@hodasalah
Copy link

@hodasalah hodasalah commented on b26e854 Sep 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in node_modules I have two package @uiw and codemirror is this cause this problem

@hodasalah
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@hodasalah
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

│ └── @codemirror/[email protected] deduped
├── @codemirror/[email protected]
├─┬ @codemirror/[email protected] │ └── @codemirror/[email protected] deduped
├─┬ @codemirror/[email protected]
│ └── @codemirror/[email protected] deduped
├─┬ @uiw/[email protected]
│ ├─┬ @codemirror/[email protected]
│ │ └── @codemirror/[email protected] deduped
│ ├─┬ @codemirror/[email protected]
│ │ └── @codemirror/[email protected] deduped
│ ├─┬ @codemirror/[email protected]
│ │ └── @codemirror/[email protected] deduped
│ └── @codemirror/[email protected] deduped
└─┬ [email protected]
└── @codemirror/[email protected] deduped

@jaywcjlove
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hodasalah You didn't give me an example and I can't solve your problem.

@hodasalah
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaywcjlove https://codesandbox.io/s/laughing-wu-7kbd5z?file=/src/App.js
this is my code it is same i don't know why it works here but in my app give me the erre

Please sign in to comment.