【问题标题】:Using postcss with autoprefixer and geting the error - 'cannot find module'使用带有 autoprefixer 的 postcss 并得到错误 - '找不到模块'
【发布时间】:2017-08-31 17:45:42
【问题描述】:

我正在尝试使用 npm 脚本添加前缀。

这是我正在使用的 npm 脚本

postcss --use autoprefixer prodapp/css/sass.css -d prodapp/css/

在他们的 git hub 页面上,他们也显示了相同的命令。 https://github.com/postcss/autoprefixer#cli

这是我遇到的错误

x Plugin Error: Cannot find module 'prodapp/css/sass.css'

【问题讨论】:

  • 您提供的链接以不同的顺序显示参数。试试看:postcss prodapp/css/sass.css --use autoprefixer -d prodapp/css/
  • 谢谢兄弟。那行得通。您可以将其添加为答案

标签: npm postcss autoprefixer npm-scripts


【解决方案1】:

Robc 的建议对我有用。正确的脚本应该遵循如下顺序

postcss prodapp/css/sass.css --use autoprefixer -d prodapp/css/

【讨论】:

    猜你喜欢
    • 2019-02-16
    • 1970-01-01
    • 2019-01-07
    • 2018-09-10
    • 2016-03-29
    • 2020-01-25
    • 2021-04-02
    • 2014-04-21
    • 1970-01-01
    相关资源
    最近更新 更多