Cypress - webpack compilation error during the pageobjects import in a test case #15019
Unanswered
faprile
asked this question in
Component Testing
Replies: 1 comment 4 replies
-
Is the |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I'm trying to set up my first pageobject in cypress but I had this error:
Error: Webpack Compilation Error ./cypress/integration/test/login2.spec.js Module not found: Error: Can't resolve 'integration/pageObjects/login' in 'C:\Users\USER\Documents\cypress\cypress\integration\test' resolve 'integration/pageObjects/login' in 'C:\Users\USER\Documents\cypress\cypress\integration\test' Parsed request is a module using description file: C:\Users\USER\Documents\cypress\cypress\package.json (relative path: ./integration/test) Field 'browser' doesn't contain a valid alias configuration
my test:
`import Login from 'integration/pageObjects/login'
describe('Login', () => {
const login = new Login()
it('Sign in', () => {
cy.fixture("data").then((data) => {
})
})`
and my page object:
`class Login {
}
export default Login`
What could be the problem?
Thanks to all!
Beta Was this translation helpful? Give feedback.
All reactions