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

engines config breaks deploys to Netlify #12

Closed
wKovacs64 opened this issue Mar 22, 2018 · 5 comments · Fixed by #14
Closed

engines config breaks deploys to Netlify #12

wKovacs64 opened this issue Mar 22, 2018 · 5 comments · Fixed by #14

Comments

@wKovacs64
Copy link
Contributor

  • react-testing-library version: 1.4.0
  • node version: 6.13.1
  • npm (or yarn) version: yarn 0.18.1

Relevant code or config:

react-testing-library package.json:

"engines": {
  "node": ">=8",
  "npm": ">=5"
},

What you did:

  • deployed existing site to Netlify after adding react-testing-library to devDependencies

What happened:

  • Netlify deploy failed:
7:57:52 PM: error [email protected]: The engine "node" is incompatible with this module. Expected version ">=8".
7:57:52 PM: error Found incompatible module

Problem description:

  • react-testing-library uses a somewhat restrictive engines stanza in package.json

Suggested solution:

@kentcdodds
Copy link
Member

I'd be fine with 6. But why don't you upgrade to 8?

@wKovacs64
Copy link
Contributor Author

In this particular case, I could, as Netlify provides a way to do that and I don't care about the Node version for my app. But I'd imagine scenarios exist where that's not possible, either due to lack of control of the runtime environment or app-specific target requirements or what-have-you. It seems like an odd and unexpected developer experience to require runtime environment changes to use such a small testing library when there's no underlying technical reason for it.

6 makes sense, I'll send a PR for it. Thanks!

@wKovacs64
Copy link
Contributor Author

wKovacs64 commented Mar 22, 2018

Oh. Just noticed kcd-scripts uses Object.entries. Thoughts? Maybe this truly does require Node 8.

@kentcdodds
Copy link
Member

kcd-scripts shouldn't make any difference for whether you can use this library. This library doesn't depend on kcd-scripts (except as a dev dependency, which you shouldn't need to install). Now if you're using kcd-scripts yourself, then yes, you'll have to use Node 8. That will never support less than Node 8.

@wKovacs64
Copy link
Contributor Author

Yeah, I was mistakenly trying to run your validate script in react-testing-library on Node 6. Sorry for the confusion, lack of sleep and running on fumes today. 😄

lucbpz pushed a commit to lucbpz/react-testing-library that referenced this issue Jul 26, 2020
feat: 🎸 add allAtOnce optiont to type()
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

Successfully merging a pull request may close this issue.

2 participants