standard / vscode-standard

VS Code extension for JavaScript Standard Style (`standard`) with automatic fixing
https://marketplace.visualstudio.com/items?itemName=standard.vscode-standard
MIT License
121 stars 24 forks source link

can't get the extension to work with WSL / global install #534

Open ahmadnassri opened 1 year ago

ahmadnassri commented 1 year ago

What version of this package are you using?

What operating system, Node.js, and npm version?

What happened?

when using the following configuration:

    "standard.enable": true,
    "standard.enableGlobally": true,
    "standard.usePackageJson": false,
    "standard.autoFixOnSave": true,
    "standard.validate": ["javascript", "javascript react"],
    "standard.nodePath": "/home/ahmad/.nvm/versions/node/v20.5.0/lib/node_modules",

I get the following error:

[Error - 10:35:53 AM] Failed to apply command: standard.applyAutoFix

if I remove the nodePath config, I get the following error instead:

[Info  - 10:36:24 AM] 
Failed to load the JavaScript Standard Style library for the document [...]/server.js

To use JavaScript Standard Style please install JavaScript Standard Style by running 'npm install standard' in the workspace folder node-serve-reload-replace
or globally using 'npm install -g standard'. You need to reopen the workspace after installing JavaScript Standard Style.

Alternatively you can disable JavaScript Standard Style for the workspace folder node-serve-reload-replace by executing the 'Disable JavaScript Standard Style' command.

What did you expect to happen?

should work without requiring to install standard as a direct project dependency.

Are you willing to submit a pull request to fix this bug?

If I have a clear direction to where the fix might be, sure.

ahmadnassri commented 9 months ago

found my own issue again ... this has been plaguing me this whole time... still no resolution