jsonforms icon indicating copy to clipboard operation
jsonforms copied to clipboard

Fix peer dependency range

Open sdirix opened this issue 4 years ago • 4 comments

Describe the bug

For the last prerelease, the peer dependency range within JSON Forms was set too tightly. It either needs to be updated with each release for the exact version or needs to be set to a range, e.g. ^.

Expected behavior

NPM should not warn when installing correct JSON Forms packages, i.e. @jsonforms/core, @jsonforms/react and @jsonforms/material-renderers.

Steps to reproduce the issue

Install @jsonforms/core, @jsonforms/react and @jsonforms/material-renderers in version 3.0.0-beta.1.

Screenshots

No response

In which browser are you experiencing the issue?

N/A

Framework

Core, React

RendererSet

Material

Additional context

See this community discussion thread: https://jsonforms.discourse.group/t/help-with-getting-start-creating-json-form-app/641/4

sdirix avatar Mar 09 '22 11:03 sdirix

Just FYI, with npm 8.6.0 (released 2022-03-31), this peer dependency causes a dependency resolution error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @jsonforms/[email protected]
npm ERR! Found: @jsonforms/[email protected]
npm ERR! node_modules/@jsonforms/core
npm ERR!   @jsonforms/core@"^3.0.0-beta.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @jsonforms/core@"3.0.0-beta.0" from @jsonforms/[email protected]
npm ERR! node_modules/@jsonforms/react
npm ERR!   @jsonforms/react@"^3.0.0-beta.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @jsonforms/[email protected]
npm ERR! node_modules/@jsonforms/core
npm ERR!   peer @jsonforms/core@"3.0.0-beta.0" from @jsonforms/[email protected]
npm ERR!   node_modules/@jsonforms/react
npm ERR!     @jsonforms/react@"^3.0.0-beta.1" 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 /root/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-04-08T15_09_13_128Z-debug-0.log

Our dependencies from package.json:

  "dependencies": {
    "@fullstory/browser": "^1.5.1",
    "@jsonforms/core": "^3.0.0-beta.1",
    "@jsonforms/react": "^3.0.0-beta.1",
    "@popperjs/core": "^2.11.2",
    "@sentry/react": "^6.16.1",
    "@sentry/tracing": "^6.19.2",
    "ajv": "^8.10.0",
    "beautiful-react-hooks": "^1.2.0",
    "clsx": "^1.1.1",
    "date-fns": "^2.27.0",
    "deepmerge": "^4.2.2",
    "focus-trap-react": "^8.9.2",
    "js-cookie": "^3.0.1",
    "query-string": "^7.1.1",
    "ramda": "^0.28.0",
    "react": "^17.0.2",
    "react-csv": "^2.2.2",
    "react-dom": "^17.0.2",
    "react-expanding-textarea": "^2.3.5",
    "react-number-format": "^4.8.0",
    "react-popper": "^2.2.5",
    "react-query": "^3.34.19",
    "react-router-dom": "^6.2.1",
    "react-scripts": "5.0.0",
    "tailwind-merge": "^1.0.0",
    "web-vitals": "^2.1.2"
  },

That resolution error happened when doing an npm install right after upgrading npm from 8.5.4 to 8.6.0. Going back down to 8.5.4 installs successfully. It seems 8.6.0 added some "virtual tree" validation: https://github.com/npm/cli/releases/tag/v8.6.0

Right now, we can't upgrade to npm 8.6.0 due to this error, unless we perhaps downgrade @jsonforms/core to beta.0.

BryceLohr avatar Apr 08 '22 15:04 BryceLohr

This should be fixed with the latest release 3.0.0-beta.2. Can you verify?

sdirix avatar May 13 '22 07:05 sdirix

Closed for now, please reopen if issue still persists

sdirix avatar May 24 '22 13:05 sdirix

Great, thank you Stefan! We’ll check on that.

-Bryce

On May 13, 2022, at 3:35 AM, Stefan Dirix @.***> wrote:

 This should be fixed with the latest release 3.0.0-beta.2. Can you verify?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

BryceLohr avatar Oct 11 '22 07:10 BryceLohr