Open voxelstack opened 2 weeks ago
Update: My bad on adding the "vite" service, I'm not testing an app.
Removing it the error changes to Cannot find package 'mocha'
, which I can fix with pnpm install mocha --save-dev
.
Still, I get:
Error: Test failed due to following error(s):
- expect.js: Uncaught SyntaxError: The requested module '/node_modules/.pnpm/expect@29.7.0/node_modules/expect/build/index.js?v=20f5b1b3' does not provide an export named 'expect'
For these tests I have also changed the test to be as simple as it can:
import { expect } from "@wdio/globals";
describe("Lit component testing", () => {
it("should increment value on click", async () => {
expect(true).toBeTrue();
});
});
From here on out I can install expect
manually, but that just leads to another missing package and I can't imagine I'm supposed to manually add every single test dependency as a dev dependency to my project.
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'tsx' imported from F:\sandbox\litvitewdio\
This is weird, since tsx
is a dependency of @wdio/cli
so I assume the package is accessible when running the CLI package.
I was able to verify that running the setup with pnpm causes problems, e.g. for me it seems that it uses NPM for installing dependencies. There is certainly something off here. Any contributions would be appreciated.
for me it seems that it uses NPM for installing dependencies
Checking now I can confirm that the same happens with Yarn, and it fails even sooner:
yarn create wdio .
Fails with:
⚠️ Ups, something went wrong: Error calling: npm install --save-dev @wdio/cli@latest!
Yes, I am getting a bunch of TypeScript related dependencies not being able to get resolved.
pnpm wdio
fails on a Lit + Vite project.Steps to reproduce
Expected
Example test runs and passes
Actual
Did I miss any steps?