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

@wdio/runner: Error: Cannot find module #12774

Closed
Jp-Aubry opened this issue Apr 30, 2024 Discussed in #8310 · 1 comment
Closed

@wdio/runner: Error: Cannot find module #12774

Jp-Aubry opened this issue Apr 30, 2024 Discussed in #8310 · 1 comment

Comments

@Jp-Aubry
Copy link

Discussed in #8310

Originally posted by anandseshadri May 6, 2022
Hi I am new on wdio. I use wdio with Angular 17. I am trying to launch a test with rpm run wdio. i get this error:
ERROR @wdio/runner: Error: Cannot find module '/home/francois/Documents/dev/new-moulinet/moulinet/test/pageobjects/app.po' imported from /home/francois/Documents/dev/new-moulinet/moulinet/test/specs/app.e2e-spec.ts
I found a solution by importing the page object with .js extension but but I don't know if it's the right one.
I also try various confing in my ts config but it do'esn't change anything.
My spec ts config looks like that;

{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/spec",
"baseUrl": "./",
"module": "commonjs",
"target": "es6",
"types": [
"node",
"@wdio/globals/types",
"@wdio/jasmine-framework"
]
},
"include": [
"src//*.spec.ts",
"src/
/*.d.ts"
]
}
}`

and tsconfig:
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"skipLibCheck": true,
"esModuleInterop": true,
"sourceMap": true,
"declaration": false,
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"target": "ES2022",
"module": "ES2022",
"useDefineForClassFields": false,
"lib": [
"ES2022",
"dom"
]
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
}
}

Thank you for your suppor.t

@christian-bromann
Copy link
Member

Duplicate of #8310

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants