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

Incompatible node version possible for freshly generated project #79

Open
ro0gr opened this issue Mar 31, 2020 · 1 comment
Open

Incompatible node version possible for freshly generated project #79

ro0gr opened this issue Mar 31, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@ro0gr
Copy link
Contributor

ro0gr commented Mar 31, 2020

After creating a fresh project and installing the deps:

$ npx codemod-cli new codemod-cli-test && cd codemod-cli-test/ && yarn

I get the following error:

error [email protected]: The engine "node" is incompatible with this module. Expected version ">=10.13.0". Got "8.15.0"

This is caused by the fact that prettier has dropped node@8 support in v2 - https://prettier.io/blog/2020/03/21/2.0.0.html, while we still tend to node@8.

The same issue is technically possible to happen with any of

eslint: `^${await latestVersion('eslint')}`,
'eslint-config-prettier': `^${await latestVersion('eslint-config-prettier')}`,
'eslint-plugin-node': `^${await latestVersion('eslint-plugin-node')}`,
'eslint-plugin-prettier': `^${await latestVersion('eslint-plugin-prettier')}`,
jest: pkg.devDependencies.jest,
prettier: `^${await latestVersion('prettier')}`,

cause we tend to install the latest versions of the deps.

In my case I've just pinned prettier to "^1.0.0" and that works. But I'm wondering if we should improve DX here? Should we:

  • pin to the latest known majors
  • do nothing, and leave a decision to developer, whether to remove old node versions support, or downgrade some dependency
@rwjblue
Copy link
Owner

rwjblue commented Sep 25, 2020

I think the specific issue is resolved now (the last issue fixed by #94).

In my case I've just pinned prettier to "^1.0.0" and that works. But I'm wondering if we should improve DX here?

Ya, I tend to agree. Having things fail initially feels pretty bad. Let's change to use the same major that we use currently for these deps (but still grab the highest within that major).

@rwjblue rwjblue added the bug Something isn't working label Sep 25, 2020
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