If you have this problem which was saying you “Failed to load module. Attempted to load prettier from package.json” then it’s not a big deal.
Maybe when you’re using VS Code and open up a project, you got this notification. The notification was saying that “Failed to load module. If you have prettier or plugins referenced in package.json, ensure you have runnpm installAttempted to load prettier from package.json.” and the source is Prettier Code Format. You may install an extension called Prettier Code Format and the error is from this extension.
Install Prettier Globally via npm if you have never installed it globally
npm i prettier -g
Search and use the Prettier Path extension setting in your VS Code settings.
You can navigate to VS Code
Settings > Extensions > Prettier for all Prettier Extension Settings.
Update the Prettier Path to your globally installed Prettier. The path will be
usr/local/lib/node_modules/prettier for MAC OS and Linux. For Windows, the path will be
So, this is the whole process. By following this process your problem may need to solve. But, if it’s not working for you, you can inform me that on the comment section.