-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Cannot find module in file inside "node_modules". E.g. Uncaught Error: Cannot find module './../../config/dev.json' #2977
Comments
You didn't post where or how you're using this file, or what your cypress options are or what it is you're trying to do, and we'll need more information such as a reproducible repo in order to investigate this. It sounds and looks like you're trying to load default configuration which you could/would use our Configuration API which is part of the plugins system. I'm going to close this issue because there's not enough information provided. If you can provide more and demonstrate how this is happening, we'll open it again. https://docs.cypress.io/api/plugins/configuration-api.html#Usage |
@brian-mann Sorry if it is unclear, i am trying to post as much as i can. This is the an internal modularized library so I cannot share repo. The code is from an internal library in |
Yes it can - but to jump from the test running inside the browser to code running on node you need to use cy.task for example.
…Sent from my iPhone
On Dec 21, 2018, at 17:13, XI WEI ***@***.***> wrote:
@brian-mann Sorry if it is unclear, i am trying to post as much as i can. This is the an internal modularized library so I cannot share repo. The code is from an internal library in node_modules where is using config in npm library. You are right it is not using cypress config but i just want to see if cypress runner can run code in library in node_modules
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Current i am working on using cypress to create AT but i am getting issue when I import internal library which is to create users. The error is thrown from this file
where it is complaining
Cannot find module '../../config/dev.json'
at line 9. The file is located in the internal moduleshutterstock-test-user
. I confirm the path is right and config folder is on the right directory but still cannot find the module. Is there something wrong with cypress to run with external packages? Thank you!The text was updated successfully, but these errors were encountered: