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

Issue when running prettier for any APEX class in my project #16139

Closed
bbriean opened this issue Mar 7, 2024 · 1 comment
Closed

Issue when running prettier for any APEX class in my project #16139

bbriean opened this issue Mar 7, 2024 · 1 comment
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. scope:plugin The requested enhancement doesn't belong in Prettier core, but would be a good fit for a plugin

Comments

@bbriean
Copy link

bbriean commented Mar 7, 2024

Environments:

  • Prettier Version: 3.2.2
  • Running Prettier via: CLI
  • Runtime: Node.js v18
  • Operating System: Windows
  • Prettier plugins (if any): Prettier plugin apex

Steps to reproduce:

Try to run the following command :
prettier force-app/main/default/classes/Test.cls --write

On any apex class : e.g :

public with sharing class Test {

}

Expected behavior:
Success

Actual behavior:
PS C:\Projects\booster-lwr> prettier force-app/main/default/classes/Test.cls --write
[error] force-app/main/default/classes/Test.cls: TypeError: Cannot read properties of undefined (reading 'unit')
[error] at AstPath.call (file:///C:/Users/bbedford/AppData/Roaming/npm/node_modules/prettier/index.mjs:20749:20)
[error] at genericPrint (file:///C:/Projects/booster-lwr/node_modules/prettier-plugin-apex/dist/src/printer.js:2685:24)

[error] at Object.printGenerically [as print] (file:///C:/Projects/booster-lwr/node_modules/prettier-plugin-apex/dist/s
rc/printer.js:2713:17)
[error] at callPluginPrintFunction (file:///C:/Users/bbedford/AppData/Roaming/npm/node_modules/prettier/index.mjs:22303
:20)
[error] at printAstToDoc (file:///C:/Users/bbedford/AppData/Roaming/npm/node_modules/prettier/index.mjs:22258:22)
[error] at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[error] at async coreFormat (file:///C:/Users/bbedford/AppData/Roaming/npm/node_modules/prettier/index.mjs:22611:14)
[error] at async formatWithCursor (file:///C:/Users/bbedford/AppData/Roaming/npm/node_modules/prettier/index.mjs:22809:
14)
[error] at async formatFiles (file:///C:/Users/bbedford/AppData/Roaming/npm/node_modules/prettier/internal/cli.mjs:6673
:18)
[error] at async main (file:///C:/Users/bbedford/AppData/Roaming/npm/node_modules/prettier/internal/cli.mjs:7081:5)

@kachkaev
Copy link
Member

kachkaev commented Mar 8, 2024

👋 @bbriean! Please discuss this issue in https://github.com/dangmai/prettier-plugin-apex. This repo is for Prettier Core.

@kachkaev kachkaev closed this as not planned Won't fix, can't repro, duplicate, stale Mar 8, 2024
@kachkaev kachkaev added the scope:plugin The requested enhancement doesn't belong in Prettier core, but would be a good fit for a plugin label Mar 8, 2024
@github-actions github-actions bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jun 9, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. scope:plugin The requested enhancement doesn't belong in Prettier core, but would be a good fit for a plugin
Projects
None yet
Development

No branches or pull requests

2 participants