betancourtl / draft-js-custom-styles

Create custom inline styles for draft-js in a sane way
MIT License
34 stars 17 forks source link

export function fails with draft-js 10.5 works in draft 10.4 #8

Closed michelson closed 6 years ago

michelson commented 6 years ago

Hi @webdeveloperpr same issue was reported here, https://github.com/jpuri/react-draft-wysiwyg/issues/599. As this library depends on draft-js 10.5 how can I tell this package to use the 10.4 draft js version ?

note: I've just copied my draft 10.4 version into ./node-modules/draft-js-custom-styles/node_modules/draftjs and it works

betancourtl commented 6 years ago

try running npm i --save draft-js-custom-styles@2.0.3 https://www.npmjs.com/package/draft-js-custom-styles/v/2.0.3

betancourtl commented 6 years ago

@michelson where you able to get your application working?

michelson commented 6 years ago

Hi @webdeveloperpr , Yes I was able to make it working, but I've just copied the draft 10.4 to the ./node-modules/draft-js-custom-styles/node_modules/draftjs . If I do yarn install again it fails. if I do the npm i --save draft-js-custom-styles@2.0.3 will survive for a yarn install ?

thanks

michelson commented 6 years ago

if I do the npm i --save draft-js-custom-styles@2.0.3 I get errors on other deps


$ node scripts/start.js
module.js:538
    throw err;
    ^

Error: Cannot find module 'chalk'
    at Function.Module._resolveFilename (module.js:536:15)
    at Function.Module._load (module.js:466:25)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/michelson/Documents/node_apps/dante-extended/scripts/start.js:18:15)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.```
fastingsamurai commented 6 years ago

I encountered this error as well.

It seemed to resolve when I moved draft-js from "dependancies" to "peerDependencies" in the draft-js-custom-styles package.json file.

betancourtl commented 6 years ago

Awesome, thx finding a solution to this issue.

betancourtl commented 6 years ago

I just published a new version