-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
validateOptions is not a function #17106
Comments
Looks like it may also be related to #14646 |
@msmith1114 Is this a new issue or an issue you encountered upon updating to 7.6.0? Can you provide a repo that we could run to recreate this error? It's probably some combination of webpack/ts/config that creates this issue. |
@jennifer-shehane This happened with Either way it seems to have something to do with the I've not used Cypress on a typescript project before so there could be something obviously I am doing wrong. I'll try to get a repo set up with a base level to see if I can duplicate what's going on. |
Here is what our current {
"compilerOptions": {
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"lib": [
"es6",
"dom"
],
"module": "es6",
"moduleResolution": "node",
"baseUrl": ".",
"paths": {
"*": [
"node_modules/*",
"app/packs/*"
]
},
"sourceMap": true,
"target": "es5",
"noEmit": true,
"jsx": "react",
"strictNullChecks": true
},
"exclude": [
"**/*.spec.ts",
"node_modules",
"vendor",
"public"
],
"compileOnSave": false
} and package.json:
Not sure if those help for now. |
I found this issue referenced here also: #16188 Where it was recommended to remove the I don't totally think this is ideal to recommend changing config that was previously fine but now doesn't work due to Cypress. But it may solve your issue for now without affecting anything. Let us know. |
@jennifer-shehane That does indeed work, although I am not quite sure why it affects Cypress the way it does or what exactly the side effect is exactly. But it does fix the original issue. (As well as removing the baseURL, but from my understanding that's even less desired) |
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided. |
This issue has been closed due to inactivity. |
Current behavior
Currently when attempting to run a simple spec (Such as noted in https://docs.cypress.io/guides/getting-started/writing-your-first-test#Write-a-real-test) Gives an error
validateOptions is not a function
. Specifically:Desired behavior
Should no be receiving this error
Test code to reproduce
Sample spec used (All specs fail however):
Versions
"cypress": "7.6.0",
"typescript": "^4.1.3",
"webpack": "^4.x"
Two things worth noting that did work (Gathered from looking at various issues such as #9145 and #8948 (comment)) removing
"node_modules",
from:Fixes the issue, OR removing
"baseUrl": ".",
fromtsconfig.json
completely works as well. Neither of this is desirable as I believe our project depends on this. I am not 100% sure I understand the issue exactly, but my guess is that it's looking at the wrong folder for the correct version of dependencies.I am not really sure the best workaround here?
The text was updated successfully, but these errors were encountered: