atls / reactjs

ReactJS Advanced Custom Modules
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

Проблема после установки @atls-ui-parts/layout #128

Closed KentCpu closed 10 months ago

KentCpu commented 10 months ago

Скоуп

Установка зависимости в payment-widget

Описание

После установки @atls-ui-parts/layout, и импорта компонентов Row и Column, yarn typecheck выдает следующую ошибку: Error: Cannot find module 'csstype' or its corresponding type declarations.

Контекст

No response

Воспроизведение

  1. Из корня проекта yarn workspace @atls/react-payment-widget add @atls-ui-parts/layout
  2. Переходим packages/payment-widget/ui/payment-fields.conponent.tsx
  3. import { Column, Row } from '@atls-ui-parts/layout'
  4. Получаем ошибку при yarn typecheck

Ожидаемое поведение

Успешный выполнение yarn typecheck, после импорта компонентов.

Логи

yarn typecheck
➤ YN0000: ┌ Typecheck
➤ YN0000: │ .yarn/__virtual__/@atls-ui-parts-layout-virtual-3026485964/0/cache/@atls-ui-parts-layout-npm-0.0.7-ea4d3f1780-9b09886c54.zip/node_modules/@atls-ui-parts/layout/dist/box/box.co
➤ YN0000: │ mponent.d.ts
➤ YN0000: │ 
➤ YN0000: │   Error: Cannot find module 'csstype' or its corresponding type declarations.
➤ YN0000: │ 
➤ YN0000: │ 
➤ YN0000: │ .yarn/__virtual__/@atls-ui-parts-layout-virtual-3026485964/0/cache/@atls-ui-parts-layout-npm-0.0.7-ea4d3f1780-9b09886c54.zip/node_modules/@atls-ui-parts/layout/dist/box/box.co
➤ YN0000: │ mponent.d.ts
➤ YN0000: │ 
➤ YN0000: │   Error: Cannot find module 'csstype' or its corresponding type declarations.
➤ YN0000: │ 
➤ YN0000: │ 
➤ YN0000: └ Completed in 6s 873ms
➤ YN0000: Failed with errors in 6s 875ms

Медиа-материалы

No response

Действия

  1. yarn workspace @atls/react-payment-widget add csstype
  2. Ошибка осталась
  3. yarn why csstype ├─ @atls/react-payment-widget@workspace:packages/payment-widget │ └─ csstype@npm:3.1.2 (via npm:^3.1.2) │ ├─ @emotion/serialize@npm:1.1.2 │ └─ csstype@npm:3.1.2 (via npm:^3.0.2) │ ├─ @types/react@npm:17.0.62 │ └─ csstype@npm:3.1.2 (via npm:^3.0.2) │ ├─ @types/react@npm:18.2.18 │ └─ csstype@npm:3.1.2 (via npm:^3.0.2) │ └─ @types/styled-system@npm:5.1.16 └─ csstype@npm:3.1.2 (via npm:^3.0.2)

Вопрос

  1. Думаю ошибка из-за нескольких версий csstype, как я могу решить эту проблему ?
Nelfimov commented 10 months ago

@KentCpu Закоммить пожалуйста актуальный код

KentCpu commented 10 months ago

@Nelfimov закоммитил

Nelfimov commented 10 months ago

Фикс: https://github.com/atls/reactjs/commit/1ce29b384640d9be0550d9c6f4dc07083821137a

KentCpu commented 10 months ago

Проблема решена