@cypress/vue TypeError: Cannot read property 'rules' of undefined during manual installation
See original GitHub issueCurrent behavior
Following the manual-install guide for @cypress/vue
package shows the following error when cypress open
Message: The function exported by the plugins file threw an error.
We invoked the function exported by /Users/alvarosaburido/Projects/dav/digital.av.portal/cypress/plugins/index.js
, but it threw an error.
Details:
TypeError: Cannot read property 'rules' of undefined
at insertBabelLoader (/Users/alvarosaburido/Projects/dav/digital.av.portal/node_modules/@cypress/vue/dist/preprocessor/webpack.js:111:20)
at onFileDefaultPreprocessor (/Users/alvarosaburido/Projects/dav/digital.av.portal/node_modules/@cypress/vue/dist/preprocessor/webpack.js:137:5)
at cypressPluginsFn (/Users/alvarosaburido/Projects/dav/digital.av.portal/node_modules/@cypress/vue/dist/plugins/webpack/index.js:20:29)
at module.exports (/Users/alvarosaburido/Projects/dav/digital.av.portal/cypress/plugins/index.js:22:3)
at /Users/alvarosaburido/Library/Caches/Cypress/6.4.0/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/child/run_plugins.js:89:12
at tryCatcher (/Users/alvarosaburido/Library/Caches/Cypress/6.4.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/util.js:16:23)
at Function.Promise.attempt.Promise.try (/Users/alvarosaburido/Library/Caches/Cypress/6.4.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/method.js:39:29)
at load (/Users/alvarosaburido/Library/Caches/Cypress/6.4.0/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/child/run_plugins.js:86:7)
at EventEmitter.<anonymous> (/Users/alvarosaburido/Library/Caches/Cypress/6.4.0/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/child/run_plugins.js:200:5)
at EventEmitter.emit (events.js:315:20)
at process.<anonymous> (/Users/alvarosaburido/Library/Caches/Cypress/6.4.0/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/util.js:19:22)
at process.emit (events.js:315:20)
at process.emit (/Users/alvarosaburido/Library/Caches/Cypress/6.4.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/source-map-support/source-map-support.js:495:21)
at emit (internal/child_process.js:876:12)
at processTicksAndRejections (internal/process/task_queues.js:85:21)
Stack trace:
Error: The function exported by the plugins file threw an error.
We invoked the function exported by `/Users/alvarosaburido/Projects/dav/digital.av.portal/cypress/plugins/index.js`, but it threw an error.
at Object.get (/Users/alvarosaburido/Library/Caches/Cypress/6.4.0/Cypress.app/Contents/Resources/app/packages/server/lib/errors.js:966:15)
at EventEmitter.<anonymous> (/Users/alvarosaburido/Library/Caches/Cypress/6.4.0/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/index.js:144:21)
at EventEmitter.emit (events.js:315:20)
at ChildProcess.<anonymous> (/Users/alvarosaburido/Library/Caches/Cypress/6.4.0/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/util.js:19:22)
at ChildProcess.emit (events.js:315:20)
at emit (internal/child_process.js:876:12)
at processTicksAndRejections (internal/process/task_queues.js:85:21)
Desired behavior
Cypress works correctly
Test code to reproduce
- Follow this guide https://github.com/cypress-io/cypress/blob/develop/npm/vue/docs/manual-install.md in a non-Vue-cli project.
- Command
cypress open
- Check line
111
onnode_modules/@cypress/vue/dist/preprocessor/webpack
Versions
"cypress": "^6.4.0"
"@cypress/vue": "^1.0.0-alpha.4",
"@cypress/webpack-preprocessor": "^4.1.0",
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Cypress TypeError: Cannot read properties of undefined ...
The issue has nothing to do with the use or not of "uid" in you code. The issue is in the cucumber dependency...
Read more >Changelog - Cypress Documentation
Cypress no longer throws the error "cannot read property split of undefined" in certain circumstances when application errors are thrown. Fixes #17378.
Read more >Cypress - Cannot read property 'add' of undefined - Laracasts
Hi I'm new to testing with Cypress and wading my way through but have come across an error I can't seem to resolve....
Read more >@cypress/vue - npm
Instead of running your tests in node (using Jest or Mocha), the Cypress Component Testing Library runs each component in the real browser...
Read more >uncaught typeerror: cannot read properties of undefined ...
Store , you now use createStore to create the store object and no need to use Vue.use(Vuex) anymore in your store.js . import ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is a bug with our semantic release process. We didn’t promote the
master
tag tolatest
. Nice catch. For an immediate (very temp) fix you cannpm i @cypress/vue@master
to get around it and when we do our breaking changes and major version bump in a few days, we’ll be changing thelatest
tag to be 2.xAwesome! Yeah, I also have issues sometimes with the semantic release hehe. Cheers!