Code Monkey home page Code Monkey logo

Comments (37)

michelson avatar michelson commented on September 22, 2024 1

ok, I think we need to:

  • Remove React from dependences on dante3 package.json
  • Put a react dependency in both peerDependencies and devDependencies on dante3 package.json.

from dante.

michelson avatar michelson commented on September 22, 2024

Hi there, which version are you using? please try the latest version 1.1.4

from dante.

pavel-genuine avatar pavel-genuine commented on September 22, 2024

here is the code :
Screenshot (163)

Hi there, which version are you using? please try the latest version 1.1.4

I'm using latest version
Screenshot (161)

from dante.

michelson avatar michelson commented on September 22, 2024

uhm... not sure what could be the issue, I see that you have at least 4 editors (draft, medium draft, ace & monaco :O) it may be a problem with dependences, try to have minimal dependences and remove all the node_modules and install again.

also, try to add this to your package.json

"resolutions": {
"prosemirror-model": "^1.18.1",
"prosemirror-view": "^1.27.0",
"prosemirror-state": "^1.4.1"
},

from dante.

pavel-genuine avatar pavel-genuine commented on September 22, 2024

uhm... not sure what could be the issue, I see that you have at least 4 editors (draft, medium draft, ace & monaco :O) it may be a problem with dependences, try to have minimal dependences and remove all the node_modules and install again.

also, try to add this to your package.json

"resolutions": { "prosemirror-model": "^1.18.1", "prosemirror-view": "^1.27.0", "prosemirror-state": "^1.4.1" },

I've added the dante3 in another project , but still same issue
Screenshot (165)

please help me out... I just love the editor and can't wait to see it on my project !

from dante.

pavel-genuine avatar pavel-genuine commented on September 22, 2024

uhm... not sure what could be the issue, I see that you have at least 4 editors (draft, medium draft, ace & monaco :O) it may be a problem with dependences, try to have minimal dependences and remove all the node_modules and install again.

also, try to add this to your package.json

"resolutions": { "prosemirror-model": "^1.18.1", "prosemirror-view": "^1.27.0", "prosemirror-state": "^1.4.1" },

Please let me know the updates .. I'm eagerly awaiting...

from dante.

michelson avatar michelson commented on September 22, 2024

sorry that I can't be more helpful here. It's really hard to guess without code that I could reproduce. If you want to publish a codesandbox with the error.

from dante.

pavel-genuine avatar pavel-genuine commented on September 22, 2024

sorry that I can't be more helpful here. It's really hard to guess without code that I could reproduce. If you want to publish a codesandbox with the error.
Screenshot (167)

on codesandbox showing other error : https://codesandbox.io/s/happy-vaughan-mo99yy?file=/src/App.js

and there is a band new react project with "Uncaught TypeError: prosemirrorState.PluginKey is not a constructor" error :https://github.com/pavel-genuine/Dante3-Editor

Please help me out .

from dante.

michelson avatar michelson commented on September 22, 2024

Hi, I've updated the codesandbox using React 17, https://codesandbox.io/s/peaceful-ives-z4c0n1?file=/src/index.js
it seems that Dante is using a dependence that conflict yours.

from dante.

pavel-genuine avatar pavel-genuine commented on September 22, 2024

Hi, I've updated the codesandbox using React 17, https://codesandbox.io/s/peaceful-ives-z4c0n1?file=/src/index.js it seems that Dante is using a dependence that conflict yours.

well, using react 17 & react script 4 , it's ok.

Screenshot (171)

But any Solution for me in React 18 .
I could not use react-17 on my actual project, it's a team project, also there will be many incompatible dependencies and arise new errors. What Should I do now ?

Screenshot (172)

from dante.

pavel-genuine avatar pavel-genuine commented on September 22, 2024

please upgrade to React 18

from dante.

michelson avatar michelson commented on September 22, 2024

from dante.

pavel-genuine avatar pavel-genuine commented on September 22, 2024

I think in these two files :
: ./node_modules/dante3/package/umd/Dante.js
and
./node_modules/dante3/package/umd/Dante.cjs

You should import the dependencies instead of require them.

Screenshot (176)
Screenshot (175)

from dante.

pavel-genuine avatar pavel-genuine commented on September 22, 2024

Please solve it ..
By the way when would we get the updated version ?

from dante.

michelson avatar michelson commented on September 22, 2024

Sorry I will not have the time to do this for at least a week. If you are in a hurry, please try to submit a PR. I think I've already given you the pointers to do it.

from dante.

pavel-genuine avatar pavel-genuine commented on September 22, 2024

Sorry I will not have the time to do this for at least a week. If you are in a hurry, please try to submit a PR. I think I've already given you the pointers to do it.

well, firstly cloned your repo > then go went through the steps below

-> then "npm i [email protected] [email protected] --save-dev --force" (used --force cause without --force could not install and show errors) [ note: didn't use "npm i " to install all dependencies ]

->then manually wrote the peerDependencies :

 "peerDependencies": {
"react": "^18.2.0" }

code1

now what next ?

from dante.

michelson avatar michelson commented on September 22, 2024

you need to update the dante3 package.json, not the package.json on the root

  • Remove React from dependences on dante3 package.json
  • Put a react dependency in both peerDependencies and devDependencies on dante3 package.json.

check the readme file on the packages/dante3

from dante.

pavel-genuine avatar pavel-genuine commented on September 22, 2024

you need to update the dante3 package.json, not the package.json on the root

  • Remove React from dependences on dante3 package.json
  • Put a react dependency in both peerDependencies and devDependencies on dante3 package.json.

check the readme file on the packages/dante3

okay ! how to do that ? should I manually write it ?

like :
Screenshot (182)

from dante.

pavel-genuine avatar pavel-genuine commented on September 22, 2024

Please guide me if I am wrong.

from dante.

pavel-genuine avatar pavel-genuine commented on September 22, 2024

@michelson please say something

from dante.

michelson avatar michelson commented on September 22, 2024

Please guide me if I am wrong.

Hi, it looks good to me, are you going to submit PR?

from dante.

pavel-genuine avatar pavel-genuine commented on September 22, 2024

ok then I'm going to request a pull...

from dante.

pavel-genuine avatar pavel-genuine commented on September 22, 2024

Please guide me if I am wrong.

Hi, it looks good to me, are you going to submit PR?

PR has been submitted, please check it out.

from dante.

pavel-genuine avatar pavel-genuine commented on September 22, 2024

@michelson dear when I can use the react18 compatible version through "npm i dante3"?

from dante.

michelson avatar michelson commented on September 22, 2024

Hi @pavel-genuine , it was published as version 1.1.5, enjoy.

from dante.

pavel-genuine avatar pavel-genuine commented on September 22, 2024

Hi @pavel-genuine , it was published as version 1.1.5, enjoy.

but still same issue !

Screenshot (187)
Screenshot (186)
Screenshot (184)

from dante.

michelson avatar michelson commented on September 22, 2024

from dante.

pavel-genuine avatar pavel-genuine commented on September 22, 2024

@michelson Tried these steps but no good. How can I get out of it ? Please test on codesandbox

from dante.

michelson avatar michelson commented on September 22, 2024

Not sure what's wrong with your app. Here is a working example with the latest version https://codesandbox.io/s/peaceful-ives-z4c0n1?file=/src/index.js
you can take that as a starting point.

from dante.

pavel-genuine avatar pavel-genuine commented on September 22, 2024

I've also tried on codesandbox and it works nicely : https://codesandbox.io/s/dante3-react18-wejnp9

and then imported it to GitHub : https://github.com/pavel-genuine/medium-dante3-editor and then cloned the repo to my local machine... but surprisingly the same issue again... not getting what's the problem actually ?

from dante.

michelson avatar michelson commented on September 22, 2024

not sure, which node version are you using?

from dante.

pavel-genuine avatar pavel-genuine commented on September 22, 2024

not sure, which node version are you using?

v16.13.1

from dante.

michelson avatar michelson commented on September 22, 2024

I'm using the same version as you, seems like there is something specific to your dev environment, I would suggest that you start on a clean state, remove node_modules, yarn.lock etc.

from dante.

pavel-genuine avatar pavel-genuine commented on September 22, 2024

I'm using the same version as you, seems like there is something specific to your dev environment, I would suggest that you start on a clean state, remove node_modules, yarn.lock etc.

I've tried all these you mentioned , even a brand new create-react-app
is it all ok on your local machine ?

another thing : can I import the project repo to codesandbox and deploy from there ?

from dante.

pavel-genuine avatar pavel-genuine commented on September 22, 2024

hey @michelson , what's up ? hope everything going awesome ...

Actually I am' reaching you cause I'm trying to publish my very first react npm package , already explored several Medium and Geekforgeeks articles thoroughly and tried several projects and also published on npmjs.com but when install and use my package getting some errors every time ... actually I'm not getting the process and errors ...

would you please help me on how to publish an error-free react package on npmjs.com ?

from dante.

michelson avatar michelson commented on September 22, 2024

not sure how is this related to dante editor.

from dante.

pavel-genuine avatar pavel-genuine commented on September 22, 2024

not related to dante editor , actually it's another project .

from dante.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.