Skip to content
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

TypeError: net.isIP is not a function #1981

Closed
Andy-2018 opened this issue Jun 18, 2018 · 2 comments
Closed

TypeError: net.isIP is not a function #1981

Andy-2018 opened this issue Jun 18, 2018 · 2 comments
Labels
type: duplicate This issue or pull request already exists

Comments

@Andy-2018
Copy link

Andy-2018 commented Jun 18, 2018

Current behavior:

When trying to connect to SQL Server database using module mssql, this error "net.isIP is not a function" happens.

See this link tediousjs/node-mssql#516 for details. I linked it here as I think this is an issue in Cypress.

Versions

Windows 10, Cypress 3.0.1 + mssql 4.1.0.

@brian-mann
Copy link
Member

brian-mann commented Jun 18, 2018

You didn't post any code in here, which is something we ask for when opening a new issue, so we can help you and don't have to guess at what you're trying to do.

With that said, I am virtually 100% sure you are trying to require the mssql node library into your spec files. Your spec files run in the browser, not in node. It's not possible to make a connection to an SQL database out of the browser. You must do this in node.

You can use the new cy.task API to pass messages to the background node process if you want to do things like seed your DB or create records, query for stuff, etc.

In the background node process you can require in the mssql node lib and do whatever it is you want to do.

@brian-mann brian-mann added the type: duplicate This issue or pull request already exists label Jun 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants