Can't npm install editor-core due to resolve conflicts

Run npm add --save @atlaskit/editor-core and get:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! Found: typescript@4.7.4
npm ERR! node_modules/typescript
npm ERR!   peerOptional typescript@"^4.5" from react-intl-next@5.25.1
npm ERR!   node_modules/react-intl-next
npm ERR!     peer react-intl-next@"npm:react-intl@^5.18.1" from @atlaskit/editor-core@167.0.2
npm ERR!     node_modules/@atlaskit/editor-core
npm ERR!       @atlaskit/editor-core@"*" from the root project
npm ERR!     peer react-intl-next@"npm:react-intl@^5.18.1" from @atlaskit/smart-card@19.1.22
npm ERR!     node_modules/@atlaskit/smart-card
npm ERR!       peer @atlaskit/smart-card@"^19.1.12" from @atlaskit/editor-core@167.0.2
npm ERR!       node_modules/@atlaskit/editor-core
npm ERR!         @atlaskit/editor-core@"*" from the root project
npm ERR!       1 more (@atlaskit/editor-common)
npm ERR!     11 more (@atlaskit/editor-common, @atlaskit/emoji, ...)
npm ERR!   peerOptional typescript@"^4.5" from @formatjs/intl@2.2.1
npm ERR!   node_modules/react-intl-next/node_modules/@formatjs/intl
npm ERR!     @formatjs/intl@"2.2.1" from react-intl-next@5.25.1
npm ERR!     node_modules/react-intl-next
npm ERR!       peer react-intl-next@"npm:react-intl@^5.18.1" from @atlaskit/editor-core@167.0.2
npm ERR!       node_modules/@atlaskit/editor-core
npm ERR!         @atlaskit/editor-core@"*" from the root project
npm ERR!       12 more (@atlaskit/smart-card, @atlaskit/editor-common, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer typescript@"^3.4.0" from schema-dts@0.5.3
npm ERR! node_modules/schema-dts
npm ERR!   schema-dts@"^0.5.1" from json-ld-types@2.4.2
npm ERR!   node_modules/json-ld-types
npm ERR!     json-ld-types@"2.4.2" from @atlaskit/smart-card@19.1.22
npm ERR!     node_modules/@atlaskit/smart-card
npm ERR!       peer @atlaskit/smart-card@"^19.1.12" from @atlaskit/editor-core@167.0.2
npm ERR!       node_modules/@atlaskit/editor-core
npm ERR!       1 more (@atlaskit/editor-common)
npm ERR!     2 more (@atlaskit/link-provider, @atlaskit/linking-common)
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See ~/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     ~/.npm/_logs/2022-06-20T13_30_43_522Z-debug.log

Hi @TimKovalev,

I’m not a React person but I had a similar issue recently. editor-core works with

  • Node 16 & NPM
  • Node 14 & Yarn

You also need to install react-intl-next@npm:react-intl@^5.18.1.

See how that goes.

James.

1 Like