Uploaded image for project: 'Magnolia Frontend Helpers'
  1. Magnolia Frontend Helpers
  2. MGNLFE-84

peerDependencies in npm 7 prevent installing of react-editor

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • 1.0.6
    • None
    • None
    • None

      Steps to reproduce

      Make sure you run npm in version 7.
      Run: npm install @magnolia/react-editor

      Expected results

      @magnolia/react-editor installed correctly.

      Actual results

      Error:
      $ npm install @magnolia/react-editor
      npm ERR! code ERESOLVE
      npm ERR! ERESOLVE unable to resolve dependency tree
      npm ERR!
      npm ERR! While resolving: react-magnolia@0.1.0
      npm ERR! Found: react@16.14.0
      npm ERR! node_modules/react
      npm ERR! react@"^16.13.1" from the root project
      npm ERR!
      npm ERR! Could not resolve dependency:
      npm ERR! peer react@"16.12.0" from @magnolia/react-editor@1.0.5
      npm ERR! node_modules/@magnolia/react-editor
      npm ERR! @magnolia/react-editor@"*" from the root project
      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 /Users/bartoszstaryga/.npm/eresolve-report.txt for a full report.

      npm ERR! A complete log of this run can be found in:
      npm ERR! /Users/bartoszstaryga/.npm/_logs/2020-11-18T12_46_15_369Z-debug.log

      Workaround

      npm install @magnolia/react-editor --legacy-peer-deps

      Development notes

      Only react-editor has those dependencies, angular one lacks it.
      In our libs there is no need to include those dependencies.

      Info about changes in new npm:
      https://github.blog/2020-10-13-presenting-v7-0-0-of-the-npm-cli/

      Node and npm versions:https://nodejs.org/en/download/releases/

      Npm 7 is shipped with Node 15, the actual current version of node.

        Acceptance criteria

              canh.nguyen Canh Nguyen
              bstaryga Bartosz Staryga
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0d
                    0d
                    Logged:
                    Time Spent - 3.25d
                    3.25d