npx tailwindcss init报错npm error could not determine executable to run
PS D:\front-project\vue-cli-demo> npx tailwindcss init
npm error could not determine executable to run
npm error A complete log of this run can be found in: C:\Users\75364\AppData\Local\npm-cache_logs\2025-02-06T01_07_09_313Z-debug-0.log
遇到这个错,开始找日志
日志文件中没有具体信息,verbose stack Error: could not determine executable to run
定位js报错地址
这个方法是获取可执行的文件信息,我们打印一下入参
确实没有可执行文件的信息
官网给的命令是需要课执行文件的
我们仔细看下,版本其实对应不上,安装的版本是4.0.3。但是官网的版本是3.4.17.
那么我们切换下版本即可
npm install -D tailwindcss@3.4.17