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
Defining supportFile outside the root in Windows throws error: invalid WIN32 path characters #2595
Comments
@spoldman did the issue #853 solved your problem ?
VersionCypress: 3.1.5 |
This is still happening on Windows within an Nx environment with cypress e2e setup as well.
|
Same Nx/Cypress issue as @MarkPieszak & @EirikBirkeland are having... as soon as you provide a value for supportFile i.e. |
We have the same problem at the moment on Windows. I can confirm that exactly the same project runs fine on Linux and OSX.
After looking through the code a bit I suspect that the bug is somewhere in the https://github.com/cypress-io/cypress/blob/develop/packages/server/lib/plugins/preprocessor.coffee#L38 (in the |
Is there any progress on this? It is still a Blocker for all nx-workspace users on Windows. Version |
We are experiencing the same issue. |
This forces us to work with WSL and XMing. That's a pretty buggy and unstable setup. |
A workaround can be to import the file in each spec. import '../support/index.ts'; This can replace the |
Interesting - probably paths handling on Windows is incorrect, we will look into it.
module.exports = require('../../../plugins')
import '../../../support' See example of this in https://github.com/bahmutov/multiple-cy-example - there are two subfolders |
Thanks @bahmutov ! |
You would need to find the "packages" folder where we resolve the plugins
and support files, probably in "packages/server/lib". Then check the logic
to make sure it uses `path.resolve` and/or `path.join` instead of
concatenation. Also we will need a unit test to confirm the behavior
…On Mon, Jun 24, 2019 at 10:03 AM euZebe ***@***.***> wrote:
Thanks @bahmutov <https://github.com/bahmutov> !
Not sure this is an easy way to start contributing to Cypress, but I would
be glad to help if I can have a hint.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2595?email_source=notifications&email_token=AAQ4BJXX4X43NT7Y7WCDLODP4DH3RA5CNFSM4F27JSYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYNA52A#issuecomment-505024232>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAQ4BJRQ56SK5VLXPFVN6QDP4DH3RANCNFSM4F27JSYA>
.
--
Dr. Gleb Bahmutov, PhD
Schedule video chat / phone call / meeting with me via
https://calendly.com/bahmutov
gleb.bahmutov@gmail.com @bahmutov <https://twitter.com/@bahmutov>
https://glebbahmutov.com/ https://glebbahmutov.com/blog
https://github.com/bahmutov
|
I'm getting the same issue, im trying to use the directory "/support" in other repo but i got the same error. Inside the code trying to import the support files: import {
some_already_exported_function
}
from '../../../../../cy-config-ts/cypress/support/index.js' Path of support file: this is my cypress.json: {
"supportFile" : "/Git/cy-config-ts/cypress/support/index.js",
} and i got this message: |
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. |
I'm working on a monorepo project and as many monorepo projects do they tend to have their own CLI on top of to do common things across packages. One of these things is to run test.
The problem that I'm having is that when I place the
plugins/index
file outside the project root I get the following error message:but as soon as I place the
plugins/index
file inside the project root and require theplugins/index
file from outside the root of the project it works. This also happens for thesupport/index
file.Current behavior:
When I place the
plugins/index
orsupport/index
file outside the root folder I get the following error:Error: C:\Users\baldurarna\AppData\Roaming\Cypress\cy\production\projects\MMS-3bc48668dc408d2c7575d3d91289f8f1\bundles\C:\Code\Frontend\Cosmic\tools\mono-cli\src\cypress\support contains invalid WIN32 path characters.
Desired behavior:
Having these files outside the root of the project should work the same as having them inside the root of the project.
Versions
Cypress: 3.1
Chrome: 69
The text was updated successfully, but these errors were encountered: