gpt4 book ai didi

visual-studio-code - Prettier Code Formatter for VS code 失败, 'No loader specified for extension ".cjs"'

转载 作者:行者123 更新时间:2023-12-04 11:13:28 24 4
gpt4 key购买 nike

在 VS Code 中,当我选择 Format Document With...然后选择 Prettier - Code Formatter ,我收到以下错误:

Command 'Format Document' resulted in an error (No loader specified for extension ".cjs", so searchPlaces item ".prettierrc.cjs" is invalid)
据我所知,这与 VS Code 中的底层 TypeScript 没有可用于 .cjs 的加载器有关。文件和 Prettier 搜索 prettierrc.cjs但我不太明白这一切是如何组合在一起的,或者如何解决它。
有没有其他人在 VS Code 中遇到过、找到解决方法或解决了这个或类似的问题?

最佳答案

我尝试禁用 Prettier VS Code 扩展并再次启用它,这为我解决了问题。
积分@NikolajDamLarsen

关于visual-studio-code - Prettier Code Formatter for VS code 失败, 'No loader specified for extension ".cjs"',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64237862/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com