You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 5, 2022. It is now read-only.
const preprocessor = require('cypress-react-unit-test/plugins/babelrc')
module.exports = (on, config) => {
preprocessor(on, config)
// IMPORTANT to return the config object
// with the any changed environment variables
return config
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
}
I get the error
**Message:** The function exported by the plugins file threw an error.
We invoked the function exported by `/Users/home/Development/project/cypress/plugins/index.js`, but it threw an error.
**Details:** Error: Cannot find module '/Users/home/Development/project/node_modules/get-package-type/index'
Require stack:
- /Users/home/Development/project/node_modules/nyc/index.js
- /Users/home/Development/project/node_modules/@cypress/code-coverage/task.js
- /Users/home/Development/project/node_modules/cypress-react-unit-test/plugins/babelrc/index.js
- /Users/home/Development/project/cypress/plugins/index.js
- /Users/home/Library/Caches/Cypress/5.4.0/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/child/run_plugins.js
- /Users/home/Library/Caches/Cypress/5.4.0/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/child/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:961:15)
at Function.Module._resolveFilename (/Users/home/Library/Caches/Cypress/5.4.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/tsconfig-paths/lib/register.js:71:48)
at Module._load (internal/modules/cjs/loader.js:844:27)
at Function.Module._load (electron/js2c/asar.js:769:28)
at Module.require (internal/modules/cjs/loader.js:1023:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object.<anonymous> (/Users/home/Development/project/node_modules/nyc/index.js:23:24)
at Module._compile (internal/modules/cjs/loader.js:1145:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1166:10)
at Module.load (internal/modules/cjs/loader.js:981:32)
at Module._load (internal/modules/cjs/loader.js:881:14)
at Function.Module._load (electron/js2c/asar.js:769:28)
at Module.require (internal/modules/cjs/loader.js:1023:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object.<anonymous> (/Users/home/Development/project/node_modules/@cypress/code-coverage/task.js:15:13)
at Module._compile (internal/modules/cjs/loader.js:1145:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1166:10)
at Module.load (internal/modules/cjs/loader.js:981:32)
at Module._load (internal/modules/cjs/loader.js:881:14)
at Function.Module._load (electron/js2c/asar.js:769:28)
at Module.require (internal/modules/cjs/loader.js:1023:19)
at require (internal/modules/cjs/helpers.js:77:18)
**Stack trace:**
``
Error: The function exported by the plugins file threw an error.
We invoked the function exported by `/Users/home/Development/project/cypress/plugins/index.js`, but it threw an error.
at Object.get (/Users/home/Library/Caches/Cypress/5.4.0/Cypress.app/Contents/Resources/app/packages/server/lib/errors.js:968:15)
at EventEmitter.<anonymous> (/Users/home/Library/Caches/Cypress/5.4.0/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/index.js:144:21)
at EventEmitter.emit (events.js:310:20)
at ChildProcess.<anonymous> (/Users/home/Library/Caches/Cypress/5.4.0/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/util.js:19:22)
at ChildProcess.emit (events.js:310:20)
at emit (internal/child_process.js:876:12)
at processTicksAndRejections (internal/process/task_queues.js:85:21)
``
I get the same issue when adding the webpack loader via
This is weird, I will keep this open, but this is nyc not loading correctly, I have released [email protected] to only load nyc when needed, thus if you disable code coverage, then at least it does not crash
Very strange, that seems to fix the first issue, however it still shows TypeError: (0 , _schemaUtils.validate) is not a function if you try to run the test.
I've updated cypres-react-unit-test in the example app to show that error if you try to run the spec.
bahmutov
changed the title
Cannot find module node_modules/get-package-type/index
Cannot find module node_modules/get-package-type/index (in nyc module)
Oct 17, 2020
When I try to use the babelrc plugin in cypress
I get the error
I get the same issue when adding the webpack loader via
The text was updated successfully, but these errors were encountered: