Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

io-ts-http unmet peer dependencies of io-ts-types #415

Open
arijoon opened this issue Feb 28, 2023 · 2 comments
Open

io-ts-http unmet peer dependencies of io-ts-types #415

arijoon opened this issue Feb 28, 2023 · 2 comments

Comments

@arijoon
Copy link

arijoon commented Feb 28, 2023

It seems like some peer dependencies of io-ts-types are not met through this package and have to be installed on all clients. Is it possible to add these to the dependencies of io-ts-http?:

➤ YN0002: │ @api-ts/io-ts-http@npm:2.1.0 doesn't provide monocle-ts (p2db90), requested by io-ts-types
➤ YN0002: │ @api-ts/io-ts-http@npm:2.1.0 doesn't provide newtype-ts (p4f369), requested by io-ts-types
@ericcrosson-bitgo
Copy link
Contributor

Hi @arijoon, can you please provide more details on how to reproduce?

With the package.json created by:

npm init -y
npm install @api-ts/io-ts-http
package.json
{
  "name": "api-ts-issue-415",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "dependencies": {
    "@api-ts/io-ts-http": "^2.1.0"
  }
}

I can run

npm install
node -e "const _ = require('@api-ts/io-ts-http')"

without error.

Some information that might help: what package manager are you using? What version of Node.js are you using (if any)?

@arijoon
Copy link
Author

arijoon commented Mar 2, 2023

My bad should have included the package manager as it is key here. Yarn berry does not automatically install peer dependencies which could lead to this issue

Package manager: Yarn berry
nodejs version: 18

My colleague informed me that this was an explicit decision to place these as peer deps (by io-ts) so the client must install it an ensure every lib in the chain is using the same version. However it would be useful to note this for any other yarn-berry users that it'll not work by default and additional libs must be installed at the application level

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants