postcss / postcss-cli

CLI for postcss
Other
840 stars 93 forks source link

Plugin Error: Cannot find module 'dist/*.css' #198

Closed aburakab closed 6 years ago

aburakab commented 6 years ago

Hi,

I do not know why i'm getting this error! I did a lot of trials! But I'm still wondering why it's happening.

postcss --use autoprefixer dist/*.css -d dist/

Plugin Error: Cannot find module 'dist/*.css'

npm ERR! Windows_NT 10.0.16299
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build:css"
npm ERR! node v6.11.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! webapp4@1.0.0 build:css: `postcss --use autoprefixer dist/*.css -d dist/`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webapp4@1.0.0 build:css script 'postcss --use autoprefixer dist/*.css -d dist/'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the webapp4 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     postcss --use autoprefixer dist/*.css -d dist/
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs webapp4
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls webapp4
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\tfs\Code\Web App\WebApp4\npm-debug.log

npm ERR! Windows_NT 10.0.16299
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build:dev" "--" "--watch
"
npm ERR! node v6.11.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! webapp4@1.0.0 build:dev: `npm run build:sass&& npm run build:css && webpack --config config/webpack.dev.js --progress --prof
ile --colors --display-error-details --display-cached "--watch"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webapp4@1.0.0 build:dev script 'npm run build:sass && npm run build:css && webpack --config config/webpack.dev.
js --progress --profile --colors --display-error-details --display-cached "--watch"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the webapp4 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run build:sass && npm run build:css && webpack --config config/webpack.dev.js --progress --profile --colors --display-error-detail
s --display-cached "--watch"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs webapp4
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls webapp4
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\tfs\Code\Web App\WebApp4\npm-debug.log

npm ERR! Windows_NT 10.0.16299
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "watch"
npm ERR! node v6.11.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! webapp4@1.0.0 watch: `npm run build:dev -- --watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webapp4@1.0.0 watchscript 'npm run build:dev -- --watch'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the webapp4 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run build:dev -- --watch
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs webapp4
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls webapp4
npm ERR! There is likely additional logging output above.
RyanZim commented 6 years ago

postcss-cli is trying to load dist/*.css as a plugin, since it's after --use.

postcss dist/*.css --use autoprefixer -d dist/

should work.