解决 vscode使用Prettier格式化js文件报错:Cannot find module ‘./parser-babylon‘

报错如下:

["ERROR" - 11:48:58] Error formatting document. ["ERROR" - 11:48:58] Cannot find module './parser-babylon' Require stack: - d:\VueCode\VueProject\myqqmusic\node_modules\prettier\index.js - c:\Users\Administrator.SKY-20170308KWH\.vscode\extensions\esbenp.prettier-vscode-9.10.3\dist\extension.js - c:\Program Files\Microsoft VS Code\resources\app\out\vs\loader.js - c:\Program Files\Microsoft VS Code\resources\app\out\bootstrap-amd.js - c:\Program Files\Microsoft VS Code\resources\app\out\bootstrap-fork.js Error: Cannot find module './parser-babylon'

 解决办法:在vscode应用商店安装最新版的Prettier

解决 vscode使用Prettier格式化js文件报错:Cannot find module ‘./parser-babylon‘_第1张图片

你可能感兴趣的:(vscode,javascript,ide)