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.

Failed to load plugin on format with 3.2.0 and 3.6.0

See original GitHub issue

plugin failes to format files, due to Failed to load plugin exception from .vscode/extensions/esbenp.prettier-vscode-3.6.0/dist/extension.js:1:347800

reverting to 2.3.0 fixes the issue

Github Repository to Reproduce Issue

Steps To Reproduce:

  1. run “Format Document”

Expected result

A file should format when “Format Document”

Actual result

The files does not format

Additional information

My project is pretty vanilla in terms of folder structure. node_modules, .prettierrc, .eslintrc, and package.json are in the same directory, the root directory for vscode.

eslint --fix works fine and fixes prettier issues.

The following appears in “OUTPUT”

[ERROR - 3:46:17 PM] Error
Failed to load plugin 'jest' declared in 'CLIOptions': Cannot find module 'eslint-plugin-jest'
Require stack:
- /home/myuser/__placeholder__.js
Error: Failed to load plugin 'jest' declared in 'CLIOptions': Cannot find module 'eslint-plugin-jest'
Require stack:
- /home/myuser/__placeholder__.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:627:15)
    at Function.resolve (internal/modules/cjs/helpers.js:21:19)
    at Object.resolve (/home/myuser/proj/myproject/node_modules/eslint/lib/shared/relative-module-resolver.js:44:50)
    at ConfigArrayFactory._loadPlugin (/home/myuser/proj/myproject/node_modules/eslint/lib/cli-engine/config-array-factory.js:845:39)
    at /home/myuser/proj/myproject/node_modules/eslint/lib/cli-engine/config-array-factory.js:734:33
    at Array.reduce (<anonymous>)
    at ConfigArrayFactory._loadPlugins (/home/myuser/proj/myproject/node_modules/eslint/lib/cli-engine/config-array-factory.js:730:22)
    at ConfigArrayFactory._normalizeObjectConfigDataBody (/home/myuser/proj/myproject/node_modules/eslint/lib/cli-engine/config-array-factory.js:554:32)
    at _normalizeObjectConfigDataBody.next (<anonymous>)
    at ConfigArrayFactory._normalizeObjectConfigData (/home/myuser/proj/myproject/node_modules/eslint/lib/cli-engine/config-array-factory.js:491:20)
    at _normalizeObjectConfigData.next (<anonymous>)
    at createConfigArray (/home/myuser/proj/myproject/node_modules/eslint/lib/cli-engine/config-array-factory.js:307:25)
    at ConfigArrayFactory.create (/home/myuser/proj/myproject/node_modules/eslint/lib/cli-engine/config-array-factory.js:362:16)
    at createCLIConfigArray (/home/myuser/proj/myproject/node_modules/eslint/lib/cli-engine/cascading-config-array-factory.js:133:47)
    at new CascadingConfigArrayFactory (/home/myuser/proj/myproject/node_modules/eslint/lib/cli-engine/cascading-config-array-factory.js:200:29)
    at new CLIEngine (/home/myuser/proj/myproject/node_modules/eslint/lib/cli-engine/cli-engine.js:549:36)
    at getESLintCLIEngine (/home/myuser/proj/myproject/node_modules/prettier-eslint/dist/utils.js:401:12)
    at eslintFix (/home/myuser/proj/myproject/node_modules/prettier-eslint/dist/index.js:151:53)
    at format (/home/myuser/proj/myproject/node_modules/prettier-eslint/dist/index.js:119:10)
    at /home/myuser/.vscode/extensions/esbenp.prettier-vscode-3.6.0/dist/extension.js:1:351741
    at t.default.safeExecution (/home/myuser/.vscode/extensions/esbenp.prettier-vscode-3.6.0/dist/extension.js:1:352271)
    at t.default.<anonymous> (/home/myuser/.vscode/extensions/esbenp.prettier-vscode-3.6.0/dist/extension.js:1:351715)
    at Generator.next (<anonymous>)
    at s (/home/myuser/.vscode/extensions/esbenp.prettier-vscode-3.6.0/dist/extension.js:1:347800)
[INFO - 3:46:17 PM] Formatting completed in 113.350652ms.
[INFO - 3:46:38 PM] Loaded module 'prettier@1.18.2' from '/home/myuser/proj/myproject/node_modules/prettier/index.js'.

VS Code Version: 1.40.1

Prettier & Prettier Plugin Version:

issue observed with prettier-vscode 3.6.0 and 3.2.0

"eslint": "^6.6.0"
"prettier": "^1.18.2",

OS and version:

Ubuntu 19.10

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:8
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
no-response[bot]commented, Nov 26, 2019

This issue has been automatically closed because there has been no response to our request for more information from the original author. Currently, there is not enough information provided for us to take action. Please reply and reopen this issue if you need additional assistance.

1reaction
CyrilQuandallecommented, Nov 18, 2019

I have the same issue but it does not come from vscode version. I manage to make it work by downgrading to vscode-prettier to v2.3.0 and keeping vscode to 1.40.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not working properly width eslint 6 · Issue #222 - GitHub
ESLint fails to load plugins when using ESLint 6.x microsoft/vscode-eslint#696 ... Failed to load plugin on format with 3.2.0 and 3.6.0 ...
Read more >
Could not load plugin - permission denied or exec format error
Cause: This error occurs when a provider binary is the wrong architecture (32 bit TF but 64 bit provider). This may indicate the...
Read more >
Basic maven plugin project not working, Mojo ... - Stack Overflow
I am following the tutorial for creating a maven plugin and cannot run mvn install without getting errors. The info complains ...
Read more >
Bug listing with status RESOLVED with resolution OBSOLETE ...
Bug:1523 - "[IDEA] Offload work by distributing trivial ebuild maintenance to users, introduce a simple stability voting system and have a core team...
Read more >
The Elementor Pro Changelog- Version Updates
Get the latest updates to the Elementor Pro plugin. ... Global widget JS error is being thrown and editor fails to load (#17954)...
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