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

Last version of test runner is broken #88

Closed
degrammer opened this issue Nov 8, 2023 · 4 comments
Closed

Last version of test runner is broken #88

degrammer opened this issue Nov 8, 2023 · 4 comments

Comments

@degrammer
Copy link
Contributor

It seems the latest version of the test runner is broken, this is due a dependency from vscode-uri that introduced some changes that IMO are breaking and are not properly handled in latest version.

This error is coming from a fresh install of using the command npm create wdio@latest ./

Screenshot 2023-11-08 at 12 44 04 AM
@me-rsharma
Copy link

me-rsharma commented Nov 8, 2023

@degrammer I have the same when trying to run test of wdio-vscode-service

Execution of 1 workers started at 2023-11-08T06:00:15.750Z

2023-11-08T06:00:15.832Z DEBUG @wdio/utils:initialiseServices: initialise service "vscode" as NPM package
2023-11-08T06:00:17.522Z INFO @wdio/local-runner: Shutting down spawned worker
2023-11-08T06:00:17.789Z INFO @wdio/local-runner: Waiting for 0 to shut down gracefully
2023-11-08T06:00:17.790Z INFO @wdio/local-runner: shutting down
Error: Error: Failed to initilialise launcher service unknown: Error: Couldn't initialise "wdio-vscode-service".
TypeError: Cannot destructure property 'URI' of '(intermediate value).default' as it is undefined.
    at file:///C:/Users/rajeshwar.sharma/Cerence/studio/wdio-vscode-service/node_modules/wdio-vscode-service/src/server/utils.ts:6:9      
    at safeImport (file:///C:/Users/rajeshwar.sharma/Cerence/studio/wdio-vscode-service/node_modules/@wdio/utils/build/utils.js:223:15)   
    at async initialisePlugin (file:///C:/Users/rajeshwar.sharma/Cerence/studio/wdio-vscode-service/node_modules/@wdio/utils/build/initialisePlugin.js:31:20)

@tzAcee
Copy link
Contributor

tzAcee commented Nov 12, 2023

related: #81

@mikhail-g
Copy link
Contributor

mikhail-g commented Nov 15, 2023

the issue is in src/server/utils.ts:6:45
const { URI } = (await import('vscode-uri')).default
if you remove .default it will work

Possible fix:

const vscodeUri = await import('vscode-uri')
const { URI } = (vscodeUri.default && vscodeUri.default.default) ? vscodeUri.default : vscodeUri;

@christian-bromann
Copy link
Contributor

A fix for this bug is merged and will be released momentarily.

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

5 participants