最近用 macbook 的 vs code 格式化一直不顺利,找了很多方法,后面发现关掉拓展设置里面的寻找全局模块就行了
prettier.resolveGlobalModules (default: false)
When enabled, this extension will attempt to use global npm or yarn modules if local modules cannot be resolved.
NOTE: This setting can have a negative performance impact, particularly on Windows when you have attached network drives. Only enable this if you must use global modules. It is recommended that you always use local modules when possible.
去到 vs code 拓展设置里面找到 Resolve Global Modules 关掉即可
Prettier: Resolve Global Modules
When enabled, this extension will attempt to use global npm or yarn modules if local modules cannot be resolved.
This setting can have a negative performance impact, particularly on Windows when you have attached network drives. Only enable this if you must use global modules.
本文介绍了使用MacBook上的VSCode遇到格式化问题的解决方法。通过关闭拓展设置中的全局模块搜索功能,可以有效提高格式化的效率并解决相关问题。
1577

被折叠的 条评论
为什么被折叠?



