"Unrecognized token in source text" 使用 npm 命令安装 TailwindCSS 时出错

"Unrecognized token in source text" error while installing TailwindCSS using npm command

这是我在安装时遇到的错误。 我的节点是 13.x.x npm 是 7.x.x

这很可能与 PowerShell 有关,因为 @ 是那里的 metacharacter

尝试 运行 在 @tailwindcss/postcss7-compat 周围加上引号的命令。

npm install -D tailwindcss@npm:@tailwindcss/postcss7-compat "@tailwindcss/postcss7-compat" postcss@^7 autoprefixer@^9