【发布时间】:2021-04-14 01:27:03
【问题描述】:
为了缩小我的 tailwindCSS,我尝试在我的 package.json 中创建一个脚本:
"tw:prod":"NODE_ENV=production npx tailwindcss-cli@latest build ./src/css/tailwind.css -o ./public/css/tailwind.css",
但它给出了这个错误:
> 'NODE_ENV' is not recognized as an internal or external command,
> operable program or batch file. npm ERR! code ELIFECYCLE npm ERR!
> errno 1 npm ERR! ntwport@1.0.0 tw:prod: `NODE_ENV=production npx
> tailwindcss-cli@latest build ./src/css/tailwind.css -o
> ./public/css/tailwind.css` npm ERR! Exit status 1 npm ERR! npm ERR!
> Failed at the ntwport@1.0.0 tw:prod script. npm ERR! This is probably
> not a problem with npm. There is likely additional logging output
> above.
>
> npm ERR! A complete log of this run can be found in: npm ERR!
> C:\Users\gabri\AppData\Roaming\npm-cache\_logs\2021-01-08T10_21_19_799Z-debug.log
该脚本是在tailwincss的文档中找到的,为什么会出现这个错误?
【问题讨论】:
-
嗨,蒂米,欢迎来到社区。可以在这里解决您的问题吗? (可能是因为我注意到您使用的是 Windows)stackoverflow.com/questions/11928013/…
-
@tommygun 我想是的,谢谢
标签: css json npm tailwind-css