所以目前我遇到了autoprefixer的麻煩。帶NPM的Autoprefixer錯誤(✖插件錯誤:無法找到模塊)
我已經下載postcss-CLI和autoprefixer到--save-dev的和-g
當我運行如下命令: postcss ../../../htdocs/css/workflow/ homepage-announcements.css -o ../../../htdocs/css/workflow/homepage-announcements.css
正常工作,輸出爲: ✔完成../../../ htdocs/css/workflow/homepage-announcements.css(25ms)
現在我已經使用--use autoprefixer引發錯誤。命令如下。
postcss --use autoprefixer ../../../htdocs/css/workflow/homepage-announcements.css -o ../../../htdocs/css/workflow/homepage-announcements。 CSS
錯誤消息: ✖插件錯誤:無法找到模塊」 ../../../htdocs/css/workflow/homepage-announcements.css'
我已經試過一切,仍然沒有溶液:(
{
"name": "homepage-announcements",
"version": "2.0.0",
"description": "Homepage announcements",
"main": "js/Default.js",
"dependencies": {
"react": "^15.4.2"
},
"devDependencies": {
"autoprefixer": "^6.7.7",
"ava": "^0.18.2",
"babel-loader": "^6.4.1",
"eslint": "^3.19.0",
"node-sass": "^4.5.2",
"postcss": "^5.2.16",
"postcss-cli": "^3.1.1",
"webpack": "^2.3.3",
"xo": "^0.18.1"
},
"scripts": {
"build": "webpack -p && npm run sass && npm run css",
"sass": "node-sass scss/default.scss ../../../htdocs/css/workflow/homepage-announcements.css --output-style compressed && npm run css",
"css": "postcss --use autoprefixer ../../../htdocs/css/workflow/homepage-announcements.css -o ../../../htdocs/css/workflow/homepage-announcements.css",
"lint": "xo js/*.js js/**/*.js js/**/**/*.js js/**/**/**/*.js js/**/**/**/**/*.js js/**/**/**/**/**/*.js"
}