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

Cypress no longer works on AWS CodeBuild #1373

Closed
ffxsam opened this issue Feb 24, 2018 · 10 comments
Closed

Cypress no longer works on AWS CodeBuild #1373

ffxsam opened this issue Feb 24, 2018 · 10 comments
Assignees
Milestone

Comments

@ffxsam
Copy link
Contributor

ffxsam commented Feb 24, 2018

Cypress 2.x no longer works on AWS CodeBuild. I get this error during the testing phase:

error cypress@2.0.3: The engine "node" is incompatible with this module. Expected version ">=8.2.1".

What's the recommended course of action here?

@bahmutov
Copy link
Contributor

Hmm, we have upgraded to new Electron version, which is 8, so we moved our base image and CLI package to Node 8. Can you change the environment on AWS CodeBuild to be Node 8?

@ffxsam
Copy link
Contributor Author

ffxsam commented Feb 24, 2018

Unfortunately not. Not without some Docker hacking which is a bit beyond my skills. Out of the box, CodeBuild only goes up to Node.js v7.0.0.

@bahmutov
Copy link
Contributor

bahmutov commented Feb 24, 2018

Hmm, ok this is definitely wrong - our CLI package (that's what gets installed from NPM) should only require Node >= 4 but the installed package json for 2.0.3 has much stricter requirements

"engines": {
    "node": ">=8.2.1"
}
"version": "2.0.3",
  "warnings": [
    {
      "code": "ENOTSUP",
      "required": {
        "node": ">=8.2.1"
      },
      "pkgid": "cypress@2.0.3"
    },
    {
      "code": "ENOTSUP",
      "required": {
        "node": ">=8.2.1"
      },
      "pkgid": "cypress@2.0.3"
    }
  ]

this might be introduced during build process, I will investigate.
@ffxsam does the error actually prevent the installation or is it a warning?

@ffxsam
Copy link
Contributor Author

ffxsam commented Feb 24, 2018

I'm not 100% sure, but let me check and get back to you.

@brian-mann
Copy link
Member

Yeah weird... we'll look into it. The CLI's package.json only sets node >=4.0.0 here.

https://github.com/cypress-io/cypress/blob/develop/cli/package.json#L10

@bahmutov
Copy link
Contributor

Another note: we test every NPM package against different node versions in https://github.com/cypress-io/cypress-test-node-versions
For example, Node 4 versions installs and runs 2.0.3 just fine here: https://circleci.com/gh/cypress-io/cypress-test-node-versions/1978 - it just gives a warning

npm info install cypress@2.0.3 into /root/app
npm info installOne cypress@2.0.3
npm WARN engine cypress@2.0.3: wanted: {"node":">=8.2.1"} (current: {"node":"4.8.4","npm":"2.15.11"})

@bahmutov
Copy link
Contributor

Seems we are overwriting engines in the CLI package.json with engines from the root package. This is wrong. When testing we should set config value to error in this case (https://docs.npmjs.com/misc/config#engine-strict) and then fix the engines property.

@brian-mann brian-mann added this to the 2.0.4 milestone Feb 24, 2018
@brian-mann
Copy link
Member

We'll get a patch release out this weekend.

@ffxsam
Copy link
Contributor Author

ffxsam commented Feb 25, 2018

Ah, glad I reported this! I thought it seemed odd that Cypress was unhappy about being installed with node 7.x. Thanks!

@brian-mann
Copy link
Member

Released in 2.0.4.

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

No branches or pull requests

3 participants