webdevcody / code-racer

https://code-racer-eight.vercel.app
MIT License
694 stars 514 forks source link

[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. #730

Open SandipKurmi opened 11 months ago

SandipKurmi commented 11 months ago

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:

(optional) What browsers are you seeing the problem on?

Chrome

Code of Conduct