https://cypress.io logo
Join Discord
Powered by
# vue
  • s

    some-air-72294

    04/09/2021, 4:03 PM
    Currently i'm trying to yarn install from the root of the project to try again but it's taking a long time on my computer to finish the yarn install dependencies
  • s

    some-air-72294

    04/09/2021, 4:18 PM
    Looks like the errors were from not installing the dependencies on the root of the project before installing them for the examples. I also had to update my node from 14.15 to 14.16. The example runs now I'm trying to duplicate it in my own setup
  • b

    bulky-sundown-74498

    04/09/2021, 4:39 PM
    You will need to add the types to your tsconfig.json
  • b

    bulky-sundown-74498

    04/09/2021, 5:07 PM
    Did you manage to get a setup ready ?
  • s

    some-air-72294

    04/09/2021, 5:08 PM
    Yes i got the example working. My project isn't using typescript so i don't have a tsconfig.json. Your example started running after I ran the mentioned steps. Right now I'm trying to figure out what you did to make cypress/vue work with nuxt. The example doesn't have the defaults that come with cypress install
  • b

    bulky-sundown-74498

    04/09/2021, 5:08 PM
    So cypress/vue is working with nuxt out of the box
  • b

    bulky-sundown-74498

    04/09/2021, 5:08 PM
    what is not working out of the box is cypress/webpack-dev-server
  • s

    some-air-72294

    04/09/2021, 5:09 PM
    for example the example has a cypress directory with 1 file but the directory strucure is different when installing cypress in a new nuxt project
  • b

    bulky-sundown-74498

    04/09/2021, 5:09 PM
    https://github.com/cypress-io/cypress/blob/develop/npm/vue/examples/nuxt/cypress/plugins.js
  • b

    bulky-sundown-74498

    04/09/2021, 5:09 PM
    this is where the magic happens
  • b

    bulky-sundown-74498

    04/09/2021, 5:10 PM
    I remove the HTMLWebpackPlugin and the output from webpack.config I resolve from nuxtjs
  • s

    some-air-72294

    04/09/2021, 5:11 PM
    i'm adding it now to a fresh nuxt project to try to get it working
  • s

    some-air-72294

    04/09/2021, 5:24 PM
    @User i added a clean nuxt repo here and added cypress/vue. the 2 commits show what i added. I'm not sure what i'm missing but i still cant get this working with nuxt and i'm using the plugin config you have https://github.com/travis5491811/cypress-vue-nuxt
  • s

    some-air-72294

    04/09/2021, 5:26 PM
    https://github.com/travis5491811/cypress-vue-nuxt/commit/6b2f5a28a7f34d425b084301b336c2d7a63ae080
  • b

    bulky-sundown-74498

    04/09/2021, 5:28 PM
    Thank you for putting the effort, give me 30 more minutes to get back in front of a computer. I am out to pick up lunch !! ^^
  • b

    bulky-sundown-74498

    04/09/2021, 6:14 PM
    You were almost there!!!
  • b

    bulky-sundown-74498

    04/09/2021, 6:14 PM
    And, we have a fix for your issues coming in on Monday I think
  • b

    bulky-sundown-74498

    04/09/2021, 6:15 PM
    First, we need to install
    webpack-dev-server
    as a dev dependency
  • b

    bulky-sundown-74498

    04/09/2021, 6:15 PM
    You probably see it in the npm install warnings
  • b

    bulky-sundown-74498

    04/09/2021, 6:16 PM
    Then, and I need to investigate why, eslint was blocking the use of
    cy.
  • b

    bulky-sundown-74498

    04/09/2021, 6:25 PM
    You actually need to install the
    eslint-plugin-cypress
    and add it to the extend of the
    .eslint.rc
  • b

    bulky-sundown-74498

    04/09/2021, 6:25 PM
    incoming PR
  • b

    bulky-sundown-74498

    04/09/2021, 6:25 PM
    do you mind if I use this example to update the one in the cypress repo ?
  • b

    bulky-sundown-74498

    04/09/2021, 6:29 PM
    https://github.com/travis5491811/cypress-vue-nuxt/pull/1
  • s

    some-air-72294

    04/09/2021, 7:04 PM
    @User huge thank you for this!!! Yes you can use this example in the repo, i will update the latest commit with the working changes. I got it working on my Linux machine with your recommended changes. My mac is throwing the
    Failed to connect to Chrome, retrying in 1 second (attempt 62/62)
    and already tried https://github.com/cypress-io/cypress/issues/6540 But I at least confirmed everything works after the changes on my Linux machine. Thank you again!
  • b

    bulky-sundown-74498

    04/09/2021, 7:05 PM
    This error happens to me when the chrome instance has not been quit properly
  • b

    bulky-sundown-74498

    04/09/2021, 7:05 PM
    only on a mac though
  • b

    bulky-sundown-74498

    04/09/2021, 7:05 PM
    It is weird
  • b

    bulky-sundown-74498

    04/09/2021, 7:05 PM
    qui all the chrome you have open and retry
  • b

    bulky-sundown-74498

    04/09/2021, 7:06 PM
    and tell me if it helps
1...91011...37Latest