You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
It seems that the @jsonforms/core package requires tslib, lodash and prop-types as installed dependency. I could also recreate this issue with the jsonforms-react-seed, so I'll be using it for the bug report as base.
Failed to compile.
./.yarn/cache/@jsonforms-core-npm-2.5.0-a001c716d3-55644c8c1a.zip/node_modules/@jsonforms/core/lib/generators/uischema.js
Module not found: @jsonforms/core tried to access tslib, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
./.yarn/$$virtual/@jsonforms-material-renderers-virtual-d60f75eb17/0/cache/@jsonforms-material-renderers-npm-2.5.0-452d6c3961-a9d07b93bb.zip/node_modules/@jsonforms/material-renderers/lib/complex/CombinatorProperties.js
Module not found: @jsonforms/material-renderers tried to access lodash, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
./.yarn/$$virtual/@material-ui-pickers-virtual-c2c0146eff/0/cache/@material-ui-pickers-npm-3.3.10-f5e6b01c73-295219264b.zip/node_modules/@material-ui/pickers/esm/Calendar-11ae61f6.js
Module not found: @material-ui/pickers tried to access prop-types (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.
use yarn 2 aka npm install -g yarn && yarn set version berry && yarn install
yarn start
To Fix issue
yarn add tslib lodash prop-types
yarn start
Expected behavior
Expected yarn 2 to install all necessary dependencies to run the app
Additional context
After manually adding I was able to run yarn start without a compile error, but then this happend
TypeScript error in C:/Development/git/jsonforms-react-seed/src/App.tsx(8,20):
Cannot find module './schema.json' or its corresponding type declarations. TS2307
6 | import logo from './logo.svg';
7 | import './App.css';
> 8 | import schema from './schema.json';
| ^
9 | import uischema from './uischema.json';
10 | import {
11 | materialCells,
I do not know if this is a problem on my side, since I also experienced this in other apps I wrote. The error was solved by commenting the imports and use
Thanks for the report. Support for yarn2 is currently not in the shortlist of our priorities, however as it becomes more popular we'll certainly take a look. If you have experience with yarn2 and solved the issues you described we would also happily accept a contribution.
@sdirix This is not only for yarn2, but all later version that support PlugAndPlay.
The issue is not that hard to fix: declare the dependencies of the npm packages you are using in your package.json file. This should be done anyway imo to adhere to best practices in maintaining a library.
I hope bumping this issue, will help you to fix this in the next version. Thanks a lot!
Hi @Sewdn , thank you for the reminder.
We recently switched to pnpm with #2148 . As we don't hoist dependencies anymore as before, we declared dependencies explicitly in this PR. Thus, I will close this issue now.
If you still notice these issues from version v3.1.1-alpha.0 onwards, feel free to reopen this issue or open a new one.
Describe the bug
It seems that the @jsonforms/core package requires tslib, lodash and prop-types as installed dependency. I could also recreate this issue with the jsonforms-react-seed, so I'll be using it for the bug report as base.
To Reproduce
npm install -g yarn && yarn set version berry && yarn install
To Fix issue
Expected behavior
Expected yarn 2 to install all necessary dependencies to run the app
Additional context
After manually adding I was able to run
yarn start
without a compile error, but then this happendI do not know if this is a problem on my side, since I also experienced this in other apps I wrote. The error was solved by commenting the imports and use
The text was updated successfully, but these errors were encountered: