-
Notifications
You must be signed in to change notification settings - Fork 30
Commonly Asked Questions
Cheton Wu edited this page Jun 23, 2023
·
1 revision
Yarn creates duplicate dependency resolution with @tonic-ui/react
and @tonic-ui/react-lab
when using exact versions
From this commit, you can find that @tonic-ui/[email protected]
depends on @tonic-ui/react@^1.7.2
{
"name": "@tonic-ui/react-lab",
"version": "0.5.2",
"dependencies": {
"@tonic-ui/react": "^1.7.2",
"@tonic-ui/react-hooks": "^1.4.1",
"@tonic-ui/utils": "^1.1.2",
"date-fns": "2.x",
"ensure-type": "^1.5.1",
"micro-memoize": "4.x"
}
}
However, it may cause unexpected results when using exact versions with Yarn.
package.json
{
"name": "my-app",
"version": "0.1.0",
"dependencies": {
"@tonic-ui/react": "1.7.2",
"@tonic-ui/react-lab": "0.5.2"
}
}
yarn install
will produce the following results with exact versions
node_modules/@tonic-ui/react-hooks
node_modules/@tonic-ui/utils
node_modules/@tonic-ui/theme
node_modules/@tonic-ui/react // -> 1.7.2
node_modules/@tonic-ui/react/node_modules/react-is
node_modules/@tonic-ui/styled-system
node_modules/@tonic-ui/react-lab // -> 0.5.2
node_modules/@tonic-ui/react-lab/node_modules/react-is
node_modules/@tonic-ui/react-lab/node_modules/@tonic-ui/react // -> 1.8.0 (duplicate)
package.json
{
"name": "my-app",
"version": "0.1.0",
"dependencies": {
"@tonic-ui/react": "^1.7.2",
"@tonic-ui/react-lab": "^0.5.2"
}
}
yarn install
will produce the following results:
node_modules/@tonic-ui/react-hooks
node_modules/@tonic-ui/utils
node_modules/@tonic-ui/theme
node_modules/@tonic-ui/react // -> 1.7.2
node_modules/@tonic-ui/react/node_modules/react-is
node_modules/@tonic-ui/styled-system
node_modules/@tonic-ui/react-lab // -> 0.5.2