prettier-vscode
prettier-vscode copied to clipboard
.editorconfig Error: Cannot find module
Summary
Cannot run using .editorconfig
Steps To Reproduce:
- Save file
- Output reads as below
Expected result
Extension to make the world pretty like it once did
Actual result
Extension doesn't run, output as below...
I have reinstalled vscode and tried installing previous versions of the extension, no luck
VS Code Version:
Version: 1.69.1 (Universal) Commit: b06ae3b2d2dbfe28bca3134cc6be65935cdfea6a Date: 2022-07-12T08:21:51.333Z Electron: 18.3.5 Chromium: 100.0.4896.160 Node.js: 16.13.2 V8: 10.0.139.17-electron.0 OS: Darwin x64 21.5.0
Prettier Extension Version: esbenp.prettier-vscode-9.5.0
OS and version: macOS 12.4
.editorconfig:
root = true
[*.{js}]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 2
Prettier Log Output
["DEBUG" - 7:52:26 PM] Local prettier module path: '/Users/.../projects/.../node_modules/prettier/index.js'
["INFO" - 7:52:30 PM] Formatting file:///Users/...
["ERROR" - 7:52:30 PM] Invalid prettier configuration file detected.
["ERROR" - 7:52:30 PM] Cannot find module 'root = true
[*.{js}] end_of_line = lf insert_final_newline = true charset = utf-8 indent_style = space indent_size = 2'
Require stack:
- /Users/.../.vscode/extensions/esbenp.prettier-vscode-9.5.0/node_modules/prettier/index.js
- /Users/.../.vscode/extensions/esbenp.prettier-vscode-9.5.0/dist/extension.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-amd.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-fork.js
Error: Cannot find module 'root = true
[*.{js}] end_of_line = lf insert_final_newline = true charset = utf-8 indent_style = space indent_size = 2'
Require stack:
- /Users/.../.vscode/extensions/esbenp.prettier-vscode-9.5.0/node_modules/prettier/index.js
- /Users/.../.vscode/extensions/esbenp.prettier-vscode-9.5.0/dist/extension.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-amd.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-fork.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:987:15)
at p.resolve (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:761)
at Object.transform (/Users/.../.vscode/extensions/esbenp.prettier-vscode-9.5.0/node_modules/prettier/index.js:18233:34)
at runLoad (/Users/.../.vscode/extensions/esbenp.prettier-vscode-9.5.0/node_modules/prettier/third-party.js:8465:53)
at async cacheWrapper (/Users/.../.vscode/extensions/esbenp.prettier-vscode-9.5.0/node_modules/prettier/third-party.js:8294:22)
at async Promise.all (index 0)
at async t.ModuleResolver.getResolvedConfig (/Users/.../.vscode/extensions/esbenp.prettier-vscode-9.5.0/dist/extension.js:1:5036)
at async t.default.format (/Users/.../.vscode/extensions/esbenp.prettier-vscode-9.5.0/dist/extension.js:1:12083)
at async t.PrettierEditProvider.provideEdits (/Users/.../.vscode/extensions/esbenp.prettier-vscode-9.5.0/dist/extension.js:1:10196)
at async F.provideDocumentFormattingEdits (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:87:45332)
["ERROR" - 7:52:30 PM] Invalid prettier configuration file detected. See log for details.