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

[typesafe-i18n] ERROR: Unsupported package manager. #723

Open
olalonde opened this issue Aug 12, 2023 · 1 comment
Open

[typesafe-i18n] ERROR: Unsupported package manager. #723

olalonde opened this issue Aug 12, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@olalonde
Copy link

Version

5.26.0

Describe the bug

[typesafe-i18n] ERROR: Unsupported package manager. Please install the 'typesafe-i18n' npm-package manually and open a new issue at https://github.com/ivanhofer/typesafe-i18n/issues and tell us what package manager you are using.

Maybe because I'm using npm workspaces?

Reproduction

See logs.

Logs

$ npx typesafe-i18n --setup
Need to install the following packages:
  typesafe-i18n@5.26.0
Ok to proceed? (y) y
[typesafe-i18n] version 5.26.0
[typesafe-i18n] See this link for more information on how to setup this project: https://github.com/ivanhofer/typesafe-i18n/tree/main/packages/generator#options
✔ What is your base locale? … en
✔ What adapter do you want to use? › Node.js
✔ Are you using esm modules in your project? › Yes
✔ Are you using TypeScript or JavaScript? › TypeScript
✔ Where do you want your locale files to be located? … ./src/i18n/
[typesafe-i18n] generated config file: '.typesafe-i18n.json'
[typesafe-i18n] installing dependencies ...
[typesafe-i18n] ERROR: Unsupported package manager. Please install the 'typesafe-i18n' npm-package manually and open a new issue at https://github.com/ivanhofer/typesafe-i18n/issues and tell us what package manager you are using.

If you are using this project in a commercial environment please consider sponsoring 'typesafe-i18n':
https://github.com/sponsors/ivanhofer

$ npm --version
9.8.0
$ node --version
v20.5.0

Config

No response

Additional information

No response

@olalonde olalonde added the bug Something isn't working label Aug 12, 2023
@ivanhofer
Copy link
Owner

Yes, this is the issue. The error gets logged here: https://github.com/ivanhofer/typesafe-i18n/blob/main/packages/cli/src/setup/runtimes/node.mts#L44-L62
We would need to find a way to detect if the command runs inside a workspace. DO you know if this is possible in a reliable way?

And "ERROR" should probably be a "WARNING" as you are not really blocked from using typesafe-i18n. You just need to installit manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants