cypress-plugin-api icon indicating copy to clipboard operation
cypress-plugin-api copied to clipboard

Installing without npm

Open ronaldborman opened this issue 2 years ago • 0 comments

A development/acceptance server I maintain is part of infrastructure that doesn't allow internet access. So npm install is not an option. I have installed Cypress via a zip file. To install cypress-plugin-api there were some challenges but I've found a workaround:

  • copy https://unpkg.com/cypress-plugin-api@latest/dist/support.js to <project>/cypress/support/cypress-plugin-api.js;
  • add the line import './cypress-plugin-api' to <project>/cypress/support/e2e.js;
  • create a node_modules/vue folder in <project>/cypress/support;
  • copy https://unpkg.com/vue@latest/dist/vue.runtime.global.prod.js to <project>/cypress/support/node_modules/vue/index.js;
  • add the line module.exports = Vue; as the last line to <project>/cypress/support/node_modules/vue/index.js.

Perhaps somebody else could benefit from this setup. Feel free to close the issue.

ronaldborman avatar Jul 09 '23 11:07 ronaldborman