prettyHtml format error: Cannot find module 'prettier'
See original GitHub issue如何复现:
步骤1: 更新插件版本到2.3.1
步骤2: 设置插件配置 “minapp-vscode.wxmlFormatter”: “prettyHtml”, // 指定格式化工具 “minapp-vscode.prettyHtml”: { // prettyHtml 默认配置 “useTabs”: false, “tabWidth”: 2, “printWidth”: 200, “singleQuote”: false, “usePrettier”: true, “wrapAttributes”: true, // 设置成 true 强制属性换行 “sortAttributes”: true }
步骤3: 打开任意 wxml 文件进行保存
期望的表现: 正常格式化 wxml 文件
实际的表现: VS Code 右下角报错 prettyHtml format error: Cannot find module ‘prettier’
插件运行环境
插件版本
: 2.3.1VSCode版本
:1.59.1操作系统(非必须)
:windows 10
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Cannot find module 'prettier' - node.js - Stack Overflow
Prettier is a peer dependency of @vue/eslint-config-prettier so you need to add it to your own dependencies:
Read more >Cannot find module 'prettier' · Issue #905 - GitHub
Run Format document . Expected result. It should format my file using Prettier. Actual result. Got the following error instead: 13/8 ...
Read more >Cannot find module 'prettier' error | bobbyhadz
To solve the error "Cannot find module 'prettier'", make sure to install the prettier package by opening your terminal in your project's root...
Read more >Cannot find module 'prettier' error [Solved] - Reactgo
The “Cannot find module 'prettier'” error occurs due to one of the following reasons: The module is not installed in the correct project…...
Read more >pretty-html-table - PyPI
pretty_html_table exists to convert a pandas DataFrame into a pretty html table for ... The html formatting is set at the DataFrame row...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
https://github.com/wx-minapp/minapp-vscode/compare/v2.2.2...v2.3.1
这是最新版本和两年前的2.2.2版本代码diff对比, 没看出来问题,老版本运行正常吗? 问题我可以复现,最近几天修一下
升级到 v2.3.3 此问题已修复,感谢大佬