atls / reactjs

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

Проблема при установке npm пакета #124

Closed KentCpu closed 11 months ago

KentCpu commented 11 months ago

Скоуп

Установка ui компонента в payment-widget

Описание

В папке payment-widget выполнил yarn add @atls-ui-proto/input, зависимость добавилась в package.json, но при попытке импортировать компонент, возникает ошибка: "Module is not listed in package.json dependencies". При нажатии на автоматическую подсказку и выполнении установки, зависимость добавляется в корневой package.json, и ошибка исчезает. Не могу понять, из-за чего возникает ошибка.

Контекст

No response

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

  1. cd packages/payment-widget
  2. yarn add @atls-ui-proto/input
  3. import { Input } from '@atls-ui-proto/input' в ui/payment-settings.component.tsx

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

Успешный импорт ui элемента

Логи

No response

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

No response

Действия

  1. Сделал yarn why @atls-ui-proto/input payment-widget@workspace:packages/payment-widget - @atls-ui-proto/input@npm:0.0.13 [eaf3f] (via npm:^0.0.13 [eaf3f])

  2. Сделал yarn ➤ YN0000: ┌ Resolution step ➤ YN0002: │ @atls/config-jest@npm:0.0.3 doesn't provide jest (p7cd04), requested by ts-jest ➤ YN0002: │ @atls/config-jest@npm:0.0.3 doesn't provide typescript (pdc081), requested by ts-jest ➤ YN0002: │ payment-widget@workspace:packages/payment-widget doesn't provide @emotion/styled (p888f6), requested by @atls-ui-proto/input ➤ YN0002: │ payment-widget@workspace:packages/payment-widget doesn't provide styled-system (pc338a), requested by @atls-ui-proto/input ➤ YN0002: │ payment-widget@workspace:packages/payment-widget doesn't provide styled-tools (p28751), requested by @atls-ui-proto/input ➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements for details, where is the six-letter p-prefixed code ➤ YN0000: └ Completed ➤ YN0000: ┌ Fetch step ➤ YN0000: └ Completed ➤ YN0000: ┌ Link step ➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental ➤ YN0000: └ Completed ➤ YN0000: Done with warnings in 0s 504ms

  3. Выполнил yarn --version и получил странный результат 0.0.1-git.20220304.hash-6afc8ff

  4. Проблема не исчезла

Вопрос

  1. Возможно это связано с версии yarn ?
  2. Может быть я неправильно устанавливаю ui компонент и нужно подгрузить еще что-то ?
oksssvv commented 11 months ago

@KentCpu вы коммититесь? мне б ссылку на код или увидеть package.json хотя бы

KentCpu commented 11 months ago

@oksssvv с момента последнего коммита я выполнил только действия, указанные в описании, а именно - установил зависимость с помощью команды yarn add @atls-ui-proto/input. package.json (payment-widget): { "name": "payment-widget", "version": "0.0.2", "license": "BSD-3-Clause", "main": "src/index.ts", "files": [ "dist" ], "scripts": { "build": "yarn library build", "prepack": "yarn run build", "postpack": "rm -rf dist" }, "devDependencies": { "@types/react": "^17.0.38", "react": "^17.0.2" }, "peerDependencies": { "react": "^17.0.1" }, "publishConfig": { "access": "public", "main": "dist/index.js", "typings": "dist/index.d.ts" }, "dependencies": { "@atls-ui-proto/input": "^0.0.13" } }

TorinAsakura commented 11 months ago

Если проблема решена - закрывай за собой задачки