问题与处理策略
问题描述
npx tailwindhtml" title=css>css init -p
- 在使用 Tailwind CSS 的html" title=前端>前端项目中,执行上述指令,即初始化 Tailwind CSS 时,报如下错误
html" title=npm>npm error could not determine executable to run
# 报错html" title=npm>npm 错误无法确定要运行的可执行文件
问题原因
-
使用命令
html" title=npm>npm install -D tailwindhtml" title=css>css
安装的 Tailwind CSS 是4.0.0
版本 -
Tailwind CSS 的
4.0.0
版本出现了此问题
处理策略
- 将 Tailwind CSS
4.0.0
版本改成3.4.16
版本
"devDependencies": {"tailwindhtml" title=css>css": "^3.4.16"
}