cypress-io / netlify-plugin-cypress

Runs Cypress end-to-end tests after Netlify builds the site but before it is deployed

Home Page:https://www.cypress.io/blog/2020/03/30/run-cypress-tests-on-netlify-using-a-single-line/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to install Cypress

cichyadam opened this issue · comments

Versions

  • What is this plugin's version? 2.2.0
  • What is Cypress version? 9.3.1
  • What Netlify build image are you using? Ubuntu Xenial 16.04
  • What is the Node version if you know it? 14.17.3
  • What is the NPM version if you know it? 6.14.13

Describe the bug
I have installed netlify-plugin-cypress as it provides a solution to run tests with cypress and netlify-cli and I need to test the serverless functions. I have followed the documentation and steps of installation. I can run cypress locally and my tests are passing. The issue is in the build process on Netlify. I keep getting error: Failed to install Cypress. Did you forget to add Cypress as a dev dependency? even though cypress is listed in dev dependencies together with netlify-plugin-cypress and netlify-cli.

Logs and screenshots
If possible, add the log from the terminal. You can turn on debugging logging, see Debugging section of the README file.


11:20:27 AM: Build ready to start
11:20:29 AM: build-image version: 3fa6e2800752667ac56af498951f923e208f7404 (xenial)
11:20:29 AM: build-image tag: v3.10.3
11:20:29 AM: buildbot version: 8cd320132979d1a1a502e85e77b47b97cc7d659f
11:20:29 AM: Fetching cached dependencies
11:20:29 AM: Starting to download cache of 1.6GB
11:20:37 AM: Finished downloading cache in 7.853221794s
11:20:37 AM: Starting to extract cache
11:21:14 AM: Finished extracting cache in 36.565528386s
11:21:14 AM: Finished fetching cache in 44.731032342s
11:21:14 AM: Starting to prepare the repo for build
11:21:14 AM: Preparing Git Reference pull/265/head
11:21:19 AM: Parsing package.json dependencies
11:21:19 AM: Different functions path detected, going to use the one specified in the Netlify configuration file: 'functions' versus '/functions/' in the Netlify UI
11:21:19 AM: Different build command detected, going to use the one specified in the Netlify configuration file: 'yarn build' versus 'gatsby build' in the Netlify UI
11:21:20 AM: Starting build script
11:21:20 AM: Installing dependencies
11:21:20 AM: Python version set to 2.7
11:21:20 AM: Started restoring cached node version
11:21:24 AM: Finished restoring cached node version
11:21:24 AM: Attempting node version '14.17.3' from .nvmrc
11:21:25 AM: v14.17.3 is already installed.
11:21:26 AM: Now using node v14.17.3 (npm v6.14.13)
11:21:26 AM: Started restoring cached build plugins
11:21:26 AM: Finished restoring cached build plugins
11:21:26 AM: Attempting ruby version 2.7.1, read from environment
11:21:26 AM: Started restoring cached ruby version
11:21:27 AM: Finished restoring cached ruby version
11:21:29 AM: Using ruby version 2.7.1
11:21:29 AM: Using PHP version 5.6
11:21:29 AM: Started restoring cached yarn cache
11:21:56 AM: Finished restoring cached yarn cache
11:21:57 AM: No yarn workspaces detected
11:21:57 AM: Started restoring cached node modules
11:21:57 AM: Finished restoring cached node modules
11:21:57 AM: Installing NPM modules using Yarn version 1.22.4
11:21:58 AM: yarn install v1.22.4
11:21:59 AM: [1/5] Validating package.json...
11:21:59 AM: [2/5] Resolving packages...
11:22:00 AM: [3/5] Fetching packages...
11:22:38 AM: info fsevents@2.1.3: The platform "linux" is incompatible with this module.
11:22:38 AM: info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
11:22:38 AM: info fsevents@1.2.13: The platform "linux" is incompatible with this module.
11:22:38 AM: info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
11:22:38 AM: info @netlify/local-functions-proxy-darwin-arm64@1.1.1: The platform "linux" is incompatible with this module.
11:22:38 AM: info "@netlify/local-functions-proxy-darwin-arm64@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
11:22:38 AM: info @netlify/local-functions-proxy-darwin-arm64@1.1.1: The CPU architecture "x64" is incompatible with this module.
11:22:38 AM: info @netlify/local-functions-proxy-darwin-x64@1.1.1: The platform "linux" is incompatible with this module.
11:22:38 AM: info "@netlify/local-functions-proxy-darwin-x64@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
11:22:38 AM: info @netlify/local-functions-proxy-freebsd-arm64@1.1.1: The platform "linux" is incompatible with this module.
11:22:38 AM: info "@netlify/local-functions-proxy-freebsd-arm64@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
11:22:38 AM: info @netlify/local-functions-proxy-freebsd-arm64@1.1.1: The CPU architecture "x64" is incompatible with this module.
11:22:38 AM: info @netlify/local-functions-proxy-freebsd-x64@1.1.1: The platform "linux" is incompatible with this module.
11:22:38 AM: info "@netlify/local-functions-proxy-freebsd-x64@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
11:22:38 AM: info @netlify/local-functions-proxy-linux-arm@1.1.1: The CPU architecture "x64" is incompatible with this module.
11:22:38 AM: info "@netlify/local-functions-proxy-linux-arm@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
11:22:38 AM: info @netlify/local-functions-proxy-linux-arm64@1.1.1: The CPU architecture "x64" is incompatible with this module.
11:22:38 AM: info "@netlify/local-functions-proxy-linux-arm64@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
11:22:38 AM: info @netlify/local-functions-proxy-linux-ia32@1.1.1: The CPU architecture "x64" is incompatible with this module.
11:22:38 AM: info "@netlify/local-functions-proxy-linux-ia32@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
11:22:38 AM: info @netlify/local-functions-proxy-linux-ppc64@1.1.1: The CPU architecture "x64" is incompatible with this module.
11:22:38 AM: info "@netlify/local-functions-proxy-linux-ppc64@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
11:22:38 AM: info @netlify/local-functions-proxy-openbsd-x64@1.1.1: The platform "linux" is incompatible with this module.
11:22:38 AM: info "@netlify/local-functions-proxy-openbsd-x64@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
11:22:38 AM: info @netlify/local-functions-proxy-win32-ia32@1.1.1: The platform "linux" is incompatible with this module.
11:22:38 AM: info "@netlify/local-functions-proxy-win32-ia32@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
11:22:38 AM: info @netlify/local-functions-proxy-win32-ia32@1.1.1: The CPU architecture "x64" is incompatible with this module.
11:22:38 AM: info @netlify/local-functions-proxy-win32-x64@1.1.1: The platform "linux" is incompatible with this module.
11:22:38 AM: info "@netlify/local-functions-proxy-win32-x64@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
11:22:38 AM: info @netlify/routing-local-proxy-darwin-arm64@0.34.1: The platform "linux" is incompatible with this module.
11:22:38 AM: info "@netlify/routing-local-proxy-darwin-arm64@0.34.1" is an optional dependency and failed compatibility check. Excluding it from installation.
11:22:38 AM: info @netlify/routing-local-proxy-darwin-arm64@0.34.1: The CPU architecture "x64" is incompatible with this module.
11:22:38 AM: info @netlify/routing-local-proxy-darwin-x64@0.34.1: The platform "linux" is incompatible with this module.
11:22:38 AM: info "@netlify/routing-local-proxy-darwin-x64@0.34.1" is an optional dependency and failed compatibility check. Excluding it from installation.
11:22:38 AM: info @netlify/routing-local-proxy-win32-x64@0.34.1: The platform "linux" is incompatible with this module.
11:22:38 AM: info "@netlify/routing-local-proxy-win32-x64@0.34.1" is an optional dependency and failed compatibility check. Excluding it from installation.
11:22:38 AM: info fsevents@2.3.2: The platform "linux" is incompatible with this module.
11:22:38 AM: info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
11:22:38 AM: [4/5] Linking dependencies...
11:22:38 AM: warning " > @nordinvestments/nord-storybook@1.27.9-beta2.0" has unmet peer dependency "@reduxjs/toolkit@^1.6.0".
11:22:38 AM: warning " > @nordinvestments/nord-storybook@1.27.9-beta2.0" has incorrect peer dependency "axios@^0.19.0".
11:22:38 AM: warning " > @nordinvestments/nord-storybook@1.27.9-beta2.0" has unmet peer dependency "core-js@^3.x.x".
11:22:38 AM: warning " > @nordinvestments/nord-storybook@1.27.9-beta2.0" has unmet peer dependency "history@^5.0.0".
11:22:38 AM: warning " > @nordinvestments/nord-storybook@1.27.9-beta2.0" has unmet peer dependency "query-string@^6.x.x".
11:22:38 AM: warning " > @nordinvestments/nord-storybook@1.27.9-beta2.0" has incorrect peer dependency "react-feather@^2.0.9".
11:22:38 AM: warning " > @nordinvestments/nord-storybook@1.27.9-beta2.0" has unmet peer dependency "react-redux@^7.2.4".
11:22:38 AM: warning " > @nordinvestments/nord-storybook@1.27.9-beta2.0" has unmet peer dependency "react-router-dom@^5.2.0".
11:22:38 AM: warning " > @nordinvestments/nord-storybook@1.27.9-beta2.0" has unmet peer dependency "react-toast-notifications@^2.4.4".
11:22:38 AM: warning " > @nordinvestments/nord-storybook@1.27.9-beta2.0" has unmet peer dependency "zxcvbn@4.x.x".
11:22:38 AM: warning " > bootstrap@4.4.1" has unmet peer dependency "jquery@1.9.1 - 3".
11:22:38 AM: warning " > bootstrap@4.4.1" has unmet peer dependency "popper.js@^1.16.0".
11:22:38 AM: warning " > eslint-plugin-import@2.20.2" has incorrect peer dependency "eslint@2.x - 6.x".
11:22:38 AM: warning " > eslint-plugin-jsx-a11y@6.2.3" has incorrect peer dependency "eslint@^3 || ^4 || ^5 || ^6".
11:22:38 AM: warning "gatsby > @typescript-eslint/eslint-plugin > tsutils@3.17.1" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
11:22:38 AM: warning " > gatsby-plugin-offline@4.9.0" has incorrect peer dependency "gatsby@^3.0.0-next.0".
11:22:38 AM: warning " > @nordinvestments/eslint-config-nord@0.1.25" has incorrect peer dependency "stylelint@^14.x".
11:22:38 AM: warning "@nordinvestments/eslint-config-nord > eslint-config-airbnb@18.1.0" has incorrect peer dependency "eslint@^5.16.0 || ^6.8.0".
11:22:38 AM: warning "@nordinvestments/eslint-config-nord > eslint-config-airbnb@18.1.0" has incorrect peer dependency "eslint-plugin-react-hooks@^2.5.0 || ^1.7.0".
11:22:38 AM: warning "@nordinvestments/eslint-config-nord > stylelint-config-recommended@6.0.0" has incorrect peer dependency "stylelint@^14.0.0".
11:22:38 AM: warning "@nordinvestments/eslint-config-nord > stylelint-config-standard-scss@2.0.1" has incorrect peer dependency "stylelint@^14.0.0".
11:22:38 AM: warning "@nordinvestments/eslint-config-nord > eslint-config-airbnb > eslint-config-airbnb-base@14.1.0" has incorrect peer dependency "eslint@^5.16.0 || ^6.8.0".
11:22:38 AM: warning "@nordinvestments/eslint-config-nord > stylelint-config-standard-scss > stylelint-config-recommended-scss@5.0.2" has incorrect peer dependency "stylelint@^14.0.0".
11:22:38 AM: warning "@nordinvestments/eslint-config-nord > stylelint-config-standard-scss > stylelint-config-standard@23.0.0" has incorrect peer dependency "stylelint@^14.0.0".
11:22:38 AM: warning "@nordinvestments/eslint-config-nord > stylelint-config-standard-scss > stylelint-config-recommended-scss > postcss-scss@4.0.2" has unmet peer dependency "postcss@^8.3.3".
11:22:38 AM: warning "@nordinvestments/eslint-config-nord > stylelint-config-standard-scss > stylelint-config-recommended-scss > stylelint-scss@4.0.0" has incorrect peer dependency "stylelint@^14.0.0".
11:22:38 AM: warning " > eslint-plugin-react-app@6.2.2" has incorrect peer dependency "eslint@6.x".
11:22:38 AM: warning "eslint-plugin-react-app > eslint-plugin-react-hooks@2.5.1" has incorrect peer dependency "eslint@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0".
11:22:38 AM: warning " > eslint-plugin-react-hooks@4.0.0" has incorrect peer dependency "eslint@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0".
11:22:50 AM: [5/5] Building fresh packages...
11:22:50 AM: Done in 52.18s.
11:22:50 AM: NPM modules installed using Yarn
11:22:50 AM: Started restoring cached go cache
11:22:50 AM: Finished restoring cached go cache
11:22:51 AM: go version go1.14.4 linux/amd64
11:22:51 AM: go version go1.14.4 linux/amd64
11:22:51 AM: Installing missing commands
11:22:51 AM: Verify run directory
11:22:53 AM: ​
11:22:53 AM: ────────────────────────────────────────────────────────────────
11:22:53 AM:   Netlify Build                                                 
11:22:53 AM: ────────────────────────────────────────────────────────────────
11:22:53 AM: ​
11:22:53 AM: ❯ Version
11:22:53 AM:   @netlify/build 26.2.0
11:22:53 AM: ​
11:22:53 AM: ❯ Flags
11:22:53 AM:   baseRelDir: true
11:22:53 AM:   buildId: 61e9371fc288e40008a2ec59
11:22:53 AM:   deployId: 61e9371fc288e40008a2ec5b
11:22:53 AM: ​
11:22:53 AM: ❯ Current directory
11:22:53 AM:   /opt/build/repo
11:22:53 AM: ​
11:22:53 AM: ❯ Config file
11:22:53 AM:   /opt/build/repo/netlify.toml
11:22:53 AM: ​
11:22:53 AM: ❯ Context
11:22:53 AM:   deploy-preview
11:22:53 AM: ​
11:22:53 AM: ❯ Installing plugins
11:22:53 AM:    - netlify-plugin-cypress@2.2.0
11:23:25 AM: ​
11:23:25 AM: ❯ Loading plugins
11:23:25 AM:    - netlify-plugin-contextual-env@0.3.0 from Netlify app
11:23:25 AM:    - @sentry/netlify-build-plugin@1.1.0 from Netlify app
11:23:25 AM:    - netlify-plugin-cypress@2.2.0 from netlify.toml
11:23:25 AM:    - netlify-plugin-gatsby-cache@0.3.0 from netlify.toml
11:23:25 AM:    - netlify-plugin-checklinks@4.1.1 from netlify.toml
11:23:32 AM: ​
11:23:32 AM: ────────────────────────────────────────────────────────────────
11:23:32 AM:   1. netlify-plugin-contextual-env (onPreBuild event)           
11:23:32 AM: ────────────────────────────────────────────────────────────────
11:23:32 AM: ​
11:23:32 AM: Nothing found... keeping default ENVs
11:23:32 AM: ​
11:23:32 AM: (netlify-plugin-contextual-env onPreBuild completed in 11ms)
11:23:32 AM: ​
11:23:32 AM: ────────────────────────────────────────────────────────────────
11:23:32 AM:   2. netlify-plugin-cypress (onPreBuild event)                  
11:23:32 AM: ────────────────────────────────────────────────────────────────
11:23:32 AM: ​
11:23:32 AM: Failed to install Cypress
11:23:32 AM: Did you forget to add Cypress as a dev dependency?
11:23:32 AM:   npm i -D cypress
11:23:32 AM: or
11:23:32 AM:  yarn add -D cypress
11:23:32 AM: See https://github.com/cypress-io/netlify-plugin-cypress#readme
11:23:32 AM: ​
11:23:32 AM: ────────────────────────────────────────────────────────────────
11:23:32 AM:   Plugin "netlify-plugin-cypress" failed                        
11:23:32 AM: ────────────────────────────────────────────────────────────────
11:23:32 AM: ​
11:23:32 AM:   Error message
11:23:32 AM:   Error: Failed to install Cypress. Did you forget to add Cypress as a dev dependency?
11:23:32 AM:   Command failed with ENOENT: cypress install
11:23:32 AM:   spawn cypress ENOENT
11:23:32 AM: ​
11:23:32 AM:   Plugin details
11:23:32 AM:   Package:        netlify-plugin-cypress
11:23:32 AM:   Version:        2.2.0
11:23:32 AM:   Repository:     git+https://github.com/cypress-io/netlify-plugin-cypress.git
11:23:32 AM:   npm link:       https://www.npmjs.com/package/netlify-plugin-cypress
11:23:32 AM:   Report issues:  https://github.com/cypress-io/netlify-plugin-cypress/issues
11:23:32 AM: ​
11:23:32 AM:   Error location
11:23:32 AM:   In "onPreBuild" event in "netlify-plugin-cypress" from netlify.toml
11:23:32 AM: ​
11:23:32 AM:   Resolved config
11:23:32 AM:   build:
11:23:32 AM:     command: yarn build
11:23:32 AM:     commandOrigin: config
11:23:32 AM:     environment:
11:23:32 AM:       - CYPRESS_RECORD_KEY
11:23:32 AM:       - GATSBY_ENVIRONMENT
11:23:32 AM:       - GATSBY_GOOGLE_OPTIMIZE_EXPERIMENT_ID
11:23:32 AM:       - GATSBY_GOOGLE_OPTIMIZE_VARIATION_ID
11:23:32 AM:       - GATSBY_SENTRY_DSN
11:23:32 AM:       - GATSBY_SENTRY_ENV
11:23:32 AM:       - GATSBY_WEBAPP_URL
11:23:32 AM:       - GATSBY_ZOOM_JWT_TOKEN
11:23:32 AM:       - GATSBY_ZOOM_USER_ID
11:23:32 AM:       - NODE_ENV
11:23:32 AM:       - NPM_AUTH_TOKEN
11:23:32 AM:       - PRODUCTION_GATSBY_ENVIRONMENT
11:23:32 AM:       - PRODUCTION_GATSBY_INTERCOM_APP_ID
11:23:32 AM:       - PRODUCTION_GATSBY_ONBOARDING_URL
11:23:32 AM:       - PRODUCTION_GATSBY_RETURN_API
11:23:32 AM:       - PRODUCTION_GATSBY_SENTRY_ENV
11:23:32 AM:       - PRODUCTION_GATSBY_WEBAPP_URL
11:23:32 AM:       - REVIEW_ID
11:23:32 AM:       - SENTRY_AUTH_TOKEN
11:23:32 AM:       - SENTRY_ORG
11:23:32 AM:       - SENTRY_PROJECT
11:23:32 AM:     publish: /opt/build/repo/public
11:23:32 AM:     publishOrigin: config
11:23:32 AM:   functionsDirectory: /opt/build/repo/functions
11:23:32 AM:   headers:
11:23:33 AM:     - for: /analytics/*
      values:
        Access-Control-Allow-Origin: '*'
  headersOrigin: config
  plugins:
    - inputs: {}
      origin: ui
      package: netlify-plugin-contextual-env
    - inputs: {}
      origin: ui
      package: '@sentry/netlify-build-plugin'
    - inputs: {}
      origin: config
      package: netlify-plugin-cypress
    - inputs: {}
      origin: config
      package: netlify-plugin-gatsby-cache
    - inputs: {}
      origin: config
      package: netlify-plugin-checklinks
  redirects:
    - from: /investeringsplan
      to: https://signup.nord.investments/
    - from: /resultat
      query:
        risk_score: ':risk_score'
      status: 301
      to: https://signup.nord.investments/privat/investeringsplan/resultat?risk_score=:risk_score
    - from: /investeringsplan/resultat
      query:
        risk_score: ':risk_score'
      status: 301
      to: https://signup.nord.investments/privat/investeringsplan/resultat?risk_score=:risk_score
    - from: /investeringsplan/resultat
      to: https://signup.nord.investments/privat/investeringsplan/resultat
  redirectsOrigin: config
Caching artifacts
11:23:33 AM: Started saving node modules
11:23:33 AM: Finished saving node modules
11:23:33 AM: Started saving build plugins
11:23:33 AM: Finished saving build plugins
11:23:33 AM: Started saving yarn cache
11:24:00 AM: Finished saving yarn cache
11:24:00 AM: Started saving pip cache
11:24:00 AM: Finished saving pip cache
11:24:00 AM: Started saving emacs cask dependencies
11:24:00 AM: Finished saving emacs cask dependencies
11:24:00 AM: Started saving maven dependencies
11:24:00 AM: Finished saving maven dependencies
11:24:00 AM: Started saving boot dependencies
11:24:00 AM: Finished saving boot dependencies
11:24:00 AM: Started saving rust rustup cache
11:24:00 AM: Finished saving rust rustup cache
11:24:00 AM: Started saving go dependencies
11:24:00 AM: Finished saving go dependencies
11:24:00 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
11:24:00 AM: Creating deploy upload records
11:24:00 AM: Failing build: Failed to build site
11:24:00 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2
11:24:00 AM: Finished processing build request in 3m31.449496003s

Link to the repo
The repository is private work repository so I can't link the repo.