question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: "Unable to start webhint."

See original GitHub issue

Environment (please complete the following information):

  • OS (e.g., Windows 10): Windows 11
  • Extension version (e.g., 1.2.3):

Describe the bug: image

Additional context: Snippet from output:

Found hint at c:\Users\raweil\AppData\Roaming\Code\User\globalStorage\ms-edgedevtools.vscode-edge-devtools\node_modules\hint\dist\src\lib\index.js
(node:13460) UnhandledPromiseRejectionWarning: AnalyzerError: Connector local only works with local files or directories
    at Analyzer.analyze (c:\Users\raweil\AppData\Roaming\Code\User\globalStorage\ms-edgedevtools.vscode-edge-devtools\node_modules\hint\dist\src\lib\analyzer.js:151:23)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async c:\Users\raweil\.vscode\extensions\ms-edgedevtools.vscode-edge-devtools-1.4.5\node_modules\vscode-webhint\dist\src\server.js:1:1204
    at async t.Analyzer.validateTextDocument (c:\Users\raweil\.vscode\extensions\ms-edgedevtools.vscode-edge-devtools-1.4.5\node_modules\vscode-webhint\dist\src\server.js:1:1129)
    at async t.Analyzer.validateTextDocument (c:\Users\raweil\.vscode\extensions\ms-edgedevtools.vscode-edge-devtools-1.4.5\node_modules\vscode-webhint\dist\src\server.js:1:1505)
    at async t.Analyzer.validateTextDocument (c:\Users\raweil\.vscode\extensions\ms-edgedevtools.vscode-edge-devtools-1.4.5\node_modules\vscode-webhint\dist\src\server.js:1:1505)
    at async t.Analyzer.validateTextDocument (c:\Users\raweil\.vscode\extensions\ms-edgedevtools.vscode-edge-devtools-1.4.5\node_modules\vscode-webhint\dist\src\server.js:1:1505)
    at async t.Analyzer.validateTextDocument (c:\Users\raweil\.vscode\extensions\ms-edgedevtools.vscode-edge-devtools-1.4.5\node_modules\vscode-webhint\dist\src\server.js:1:1505)
    at async t.Analyzer.validateTextDocument (c:\Users\raweil\.vscode\extensions\ms-edgedevtools.vscode-edge-devtools-1.4.5\node_modules\vscode-webhint\dist\src\server.js:1:1505)
    at async t.Analyzer.validateTextDocument (c:\Users\raweil\.vscode\extensions\ms-edgedevtools.vscode-edge-devtools-1.4.5\node_modules\vscode-webhint\dist\src\server.js:1:1505)
(Use `Code --trace-warnings ...` to show where the warning was created)
(node:13460) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 9)
(node:13460) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:13460) UnhandledPromiseRejectionWarning: AnalyzerError: Connector local only works with local files or directories
    at Analyzer.analyze (c:\Users\raweil\AppData\Roaming\Code\User\globalStorage\ms-edgedevtools.vscode-edge-devtools\node_modules\hint\dist\src\lib\analyzer.js:151:23)
    at async c:\Users\raweil\.vscode\extensions\ms-edgedevtools.vscode-edge-devtools-1.4.5\node_modules\vscode-webhint\dist\src\server.js:1:1204
    at async t.Analyzer.validateTextDocument (c:\Users\raweil\.vscode\extensions\ms-edgedevtools.vscode-edge-devtools-1.4.5\node_modules\vscode-webhint\dist\src\server.js:1:1129)
    at async c:\Users\raweil\.vscode\extensions\ms-edgedevtools.vscode-edge-devtools-1.4.5\node_modules\vscode-webhint\dist\src\server.js:1:139525
(node:13460) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 11)
(node:13460) UnhandledPromiseRejectionWarning: AnalyzerError: Connector local only works with local files or directories
    at Analyzer.analyze (c:\Users\raweil\AppData\Roaming\Code\User\globalStorage\ms-edgedevtools.vscode-edge-devtools\node_modules\hint\dist\src\lib\analyzer.js:151:23)
    at async c:\Users\raweil\.vscode\extensions\ms-edgedevtools.vscode-edge-devtools-1.4.5\node_modules\vscode-webhint\dist\src\server.js:1:1204
    at async t.Analyzer.validateTextDocument (c:\Users\raweil\.vscode\extensions\ms-edgedevtools.vscode-edge-devtools-1.4.5\node_modules\vscode-webhint\dist\src\server.js:1:1129)
    at async c:\Users\raweil\.vscode\extensions\ms-edgedevtools.vscode-edge-devtools-1.4.5\node_modules\vscode-webhint\dist\src\server.js:1:139525

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
antrosscommented, Mar 11, 2022

Thanks @GunnerGuyven, that’s very helpful!

I was able to repro the problem using a json file. It appears the extension is getting invoked when opening a json file to analyze a collection of vscode-internal files for some reason:

  • vscode://schemas/vscode-extensions
  • vscode://schemas/settings/configurationDefaults
  • vscode://schemas/settings/resourceLanguage

I’m not yet certain if this is intentional or not on VS Code’s part (feels like a variation of https://github.com/microsoft/vscode-languageserver-node/issues/506), but we should be able to ignore such URLs easily enough at the extension level before passing them into webhint.

0reactions
jsmacommented, Mar 31, 2022

Is there a way to manually get webhint updated in VS Code or do we have to wait for an official Edge Tools extension release to 1.4.7? This extension has been broken for me since the VS Code March 2022 auto-update yesterday and is also broken in the Insider’s Edition, I had not encountered this error previously.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Bug] VS Code extension error: "Unable to start webhint ...
The VS Code extension has stopped working. I'm working with Angular 8 workspaces. "npm install hint --save-dev" didn't fix it Bug report ...
Read more >
Troubleshoot webhint installation and runtime issues
To resolve this error, you must install the prerequisites of the packages. IMPORTANT: You should not use WSL to run webhint due to...
Read more >
vscode-webhint - npm
Run webhint in Visual Studio Code.. Latest version: 2.1.4, ... Start using vscode-webhint in your project by running `npm i vscode-webhint`.
Read more >
Using webhint with angular7 - node.js - Stack Overflow
When an angular application with multiple components is run and webhint is run, the html or json formatters show errors but line numbers...
Read more >
Give Me a Hint: webhint.io | A Faster Web
Webhint offers both an online scanner and CLI for testing your site's code for best practices and common errors, with the goal of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found