欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 汽车 > 新车 > npx tailwindcss init报错npm error could not determine executable to run

npx tailwindcss init报错npm error could not determine executable to run

2025/2/7 5:26:29 来源:https://blog.csdn.net/Ellen_Tangxiang/article/details/145466090  浏览:    关键词: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

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com