I am not able to configure "Prettier" into my VS Code. I followed the following steps:
- Installed Prettier and selected Prettier as the 'Default Formatter' for both User and Workspace.
- Installed node js.
- Ran the command
npm install
. - Ran the command
npm i prettier -g
. - Extracted the prettier path
npm root -g
. - Added the path '\AppData\Roaming\npm\node_modules\prettier' to the prettier path as is mentioned in the following solution in "https://stackoverflow.com/questions/58866847/in-vs-code-im-getting-this-error-failed-to-load-module-attempted-to-load-pr".
- Added the permission 'Format on Save' in the VS code.
But now I am receiving this error ["ERROR" - 4:16:59 pm] Error loading node module '\AppData\Roaming\npm\node_modules\prettier' ["ERROR" - 4:16:59 pm] Cannot find module '\AppData\Roaming\npm\node_modules\prettier'.
Any assistance would be highly appreciated.