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.

command 'extension.es-beautifier' not found

See original GitHub issue

Hello,

I’m making the switch from atom to vs code.

Having some teething problems beautifying my code (it’s mainly jsx stuff that is throwing a wobbly)

I’ve installed the extension, updated my eslintrc.json and added my key bindings.

If i use my key binding i get: command 'extension.es-beautifier' not found

then if i use the default key i get this:

es-beautifier failed. See the console log in the DevTools.

es-beautifier failed: Error: Command failed: node /Users/stockley/.vscode/extensions/dai-shi.vscode-es-beautifier-0.2.2/node_modules/es-beautifier/lib/cli.js
/Users/stockley/.vscode/extensions/dai-shi.vscode-es-beautifier-0.2.2/node_modules/eslint/lib/token-store.js:41
        const end = node.range[1];
                        ^

TypeError: Cannot read property 'range' of null
    at lastTokenIndex (/Users/stockley/.vscode/extensions/dai-shi.vscode-es-beautifier-0.2.2/node_modules/eslint/lib/token-store.js:41:25)
    at SourceCode.api.getTokenAfter (/Users/stockley/.vscode/extensions/dai-shi.vscode-es-beautifier-0.2.2/node_modules/eslint/lib/token-store.js:114:23)
    at EventEmitter.enterJSXElement (/Users/stockley/.vscode/extensions/dai-shi.vscode-es-beautifier-0.2.2/node_modules/es-beautifier/lib/rules/jsx-multiline-elements.js:85:37)
    at emitOne (events.js:101:20)
    at EventEmitter.emit (events.js:188:7)
    at NodeEventGenerator.enterNode (/Users/stockley/.vscode/extensions/dai-shi.vscode-es-beautifier-0.2.2/node_modules/eslint/lib/util/node-event-generator.js:39:22)
    at CodePathAnalyzer.enterNode (/Users/stockley/.vscode/extensions/dai-shi.vscode-es-beautifier-0.2.2/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:607:23)
    at CommentEventGenerator.enterNode (/Users/stockley/.vscode/extensions/dai-shi.vscode-es-beautifier-0.2.2/node_modules/eslint/lib/util/comment-event-generator.js:98:23)
    at Controller.enter (/Users/stockley/.vscode/extensions/dai-shi.vscode-es-beautifier-0.2.2/node_modules/eslint/lib/eslint.js:928:36)
    at Controller.__execute (/Users/stockley/.vscode/extensions/dai-shi.vscode-es-beautifier-0.2.2/node_modules/estraverse/estraverse.js:397:31)

    at checkExecSyncError (child_process.js:495:13)
    at execFileSync (child_process.js:515:13)
    at module.(anonymous function) (ELECTRON_ASAR.js:178:20)
    at execCLI (/Users/stockley/.vscode/extensions/dai-shi.vscode-es-beautifier-0.2.2/index.js:7:10)
    at Object.beautify [as provideDocumentFormattingEdits] (/Users/stockley/.vscode/extensions/dai-shi.vscode-es-beautifier-0.2.2/index.js:18:24)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:13:22729
    at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:6:9460
    at new n.Class.derive._oncancel (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:6:5563)
    at Object.f [as asWinJsPromise] (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:6:9423)
    at e.provideDocumentFormattingEdits (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:13:22683)

any ideas where i’m going wrong.

thanks dave

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
magicsponcommented, Feb 11, 2017

Thanks… works like a charm

1reaction
dai-shicommented, Feb 11, 2017

v0.2.3 is published. This fixes the error. Please try it, and if you still have problems, feel free to reopen it.

Although in your example code the chained function calls are not well indented, it’s another issue that we need to fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

VSCode: Running the contributed command:'extension.es ...
I installed the extension in VSCode 1.7.2 (latest as of now) running on node 6.5.0 and ran it on a react solution I...
Read more >
How to handle Command 'extension.commandName' not ...
After that whenever I try to execute a command it raise Command 'extension.commandName' not found error. Note: All the commands are properly ...
Read more >
How I Resolved Vue.js, VSCode, Vetur, Prettyhtml, and ...
By default, Vetur (The VS Code Vue.js Extension) uses Prettyhtml as the ... I searched for many hours and could not find a...
Read more >
VS Code API | Visual Studio Code Extension API
This page lists all VS Code APIs available to extension authors. ... However, when invoking an editor command not all argument types are...
Read more >
How to fix Prettier Extension not working issue in VS CODE
0:00 · New! Watch ads now so you can enjoy fewer interruptions. Got it.
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