webdevcody / webdevcody/code-racer

[BUG]: When attempting to add a code snippet to the web app, I encountered an error related to formatting, specifically mentioning the absence of the 'prettier-plugin-java' module.

Open
#730 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
697
Forks
594
PR merge metrics
No merged PRs in 30d

Description

Description

Issue Description

Summary:

When attempting to add a code snippet to the web app, I encountered an error related to formatting, specifically mentioning the absence of the 'prettier-plugin-java' module.

Error Message:
0: ["$@1", ["-EGmRfE_nEn0T6QfeYXI0", null]]
1: {
  "failure": {
    "reason": "Failed to format snippet, make sure language syntax is correct.\nError: Cannot find module 'prettier-plugin-java'\nRequire stack:\n- /var/task/node_modules/prettier/index.js\n- /var/task/packages/app/.next/server/app/add-snippet/page.js\n- /var/task/node_modules/next/dist/server/require.js\n- /var/task/node_modules/next/dist/server/next-server.js\n- /var/task/packages/app/___next_launcher.cjs"
  }
}
Steps to Reproduce:
  1. Navigate to the web app.
  2. Attempt to add a code snippet.
  3. Observe the error message.
Expected Behavior:

Code snippets should be added without encountering formatting errors related to the 'prettier-plugin-java' module.

Screenshots:

Include any relevant screenshots or images that help illustrate the issue. You can use the following Markdown for an image tag:

![Screenshot 2023-11-14 103558](https://github.com/webdevcody/code-racer/assets/88388131/62213377-a810-415d-bcfd-43021df7ed4d)
![Screenshot 2023-11-14 103608](https://github.com/webdevcody/code-racer/assets/88388131/4b27b208-390f-43ad-ad6d-4afd9a09ab9d)
![Screenshot 2023-11-14 104100](https://github.com/webdevcody/code-racer/assets/88388131/4266dda0-e121-4359-849a-4f6e76f878a5)
Environment:
  • Operating System: [Windows 11]
  • Browser: [Chrome Version 119.0.6045.124 (Official Build) (64-bit)]
  • Web App Version: [Web App Version, if available]
(optional) What browsers are you seeing the problem on?

Chrome

Code of Conduct
  • I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the add-snippet flow and start with the module-not-found error and require stack, including packages/app/.next/server/app/add-snippet/page.js. Trace where formatting is invoked and verify the relevant dependency or configuration is available; done means snippets can be added without the prettier-plugin-java error.

Written by the indexing model from the issue text.

Assessment

Tech stack
nextjs, typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.