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

Failed to load JavaScript Standard Style library on Visual Studio Code #482

Closed
holopekochan opened this issue Oct 14, 2022 · 3 comments
Closed

Comments

@holopekochan
Copy link

holopekochan commented Oct 14, 2022

What version of this package are you using? 2.1.2 standard engine 17.0.0
What operating system, Node.js, and npm version? npm 6.14.17 node v14.20.1

What happened? Failed to load JavaScript Standard Style library on Visual Studio Code Plugin

What did you expect to happen? load successfully

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

I have installed the newest JS Standard plugin on visual studio code and installed the engine globally.
However, it failed to load. Visual Studio Code version 1.72.1. I have reopen VS code after installation.

[Info  - 6:41:32 a.m.] 
Failed to load the JavaScript Standard Style library for the document /home/user/test.js

To use JavaScript Standard Style please install JavaScript Standard Style by running 'npm install standard' in the workspace folder sdmc
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 sdmc by executing the 'Disable JavaScript Standard Style' command.
[Info  - 6:41:32 a.m.] 
Failed to load the JavaScript Standard Style library for the document /home/user/test.js

To use JavaScript Standard Style please install JavaScript Standard Style by running 'npm install standard' in the workspace folder sdmc
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 sdmc by executing the 'Disable JavaScript Standard Style' command.
$ sudo npm -g list --depth=n

npm WARN invalid config depth="n" set in command line options

npm WARN invalid config Must be one of: null, numeric value

/usr/local/lib

├── serverless@3.22.0

└── standard@17.0.0
    "standard.enable": true,
    "standard.enableGlobally": true,
    "standard.autoFixOnSave": true,
    "standard.usePackageJson": false
@holopekochan
Copy link
Author

Also, tried to uninstall VS code from 1.72.1 and updated 1.72.2. Have the same error.

@holopekochan
Copy link
Author

holopekochan commented Oct 14, 2022

If I installed with npm install standard instead of --globally.
Same as #465
The following error shows

[Info  - 7:12:36 a.m.] JavaScript Standard Style server stopped.
[Info  - 7:12:36 a.m.] JavaScript Standard Style server is running.
[Info  - 7:12:36 a.m.] JavaScript Standard Style library loaded from: /home/user/node_modules/standard/index.js
TypeError: callback is not a function
    at /home/user/.vscode/extensions/standard.vscode-standard-2.1.2/server/out/server.js:667:17
TypeError: callback is not a function
    at /home/user/.vscode/extensions/standard.vscode-standard-2.1.2/server/out/server.js:667:17
TypeError: callback is not a function
    at /home/user/.vscode/extensions/standard.vscode-standard-2.1.2/server/out/server.js:667:17
TypeError: callback is not a function
    at /home/user/.vscode/extensions/standard.vscode-standard-2.1.2/server/out/server.js:667:17

This error does not show when I switch back to 2.12.0, however, autofix does not work.

looks like it is from here

callback(null)

@holopekochan
Copy link
Author

holopekochan commented Oct 14, 2022

updated to node v16.18.0 from v14.20.1, solve the Failed to load JavaScript Standard Style library error.
Now, only having the problem with

TypeError: callback is not a function
    at /home/cyrus/.vscode/extensions/standard.vscode-standard-2.1.2/server/out/server.js:667:17

Will keep on track for this ticket. #465

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

No branches or pull requests

1 participant