{"action":"closed","issue":{"url":"https://api.github.com/repos/jakubpawlowicz/clean-css/issues/637","labels_url":"https://api.github.com/repos/jakubpawlowicz/clean-css/issues/637/labels{/name}","comments_url":"https://api.github.com/repos/jakubpawlowicz/clean-css/issues/637/comments","events_url":"https://api.github.com/repos/jakubpawlowicz/clean-css/issues/637/events","html_url":"https://github.com/jakubpawlowicz/clean-css/issues/637","id":99471479,"number":637,"title":"TypeError: undefined is not a function (postcss-cli)","user":{"login":"DavidOliver","id":192853,"avatar_url":"https://avatars.githubusercontent.com/u/192853?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidOliver","html_url":"https://github.com/DavidOliver","followers_url":"https://api.github.com/users/DavidOliver/followers","following_url":"https://api.github.com/users/DavidOliver/following{/other_user}","gists_url":"https://api.github.com/users/DavidOliver/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidOliver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidOliver/subscriptions","organizations_url":"https://api.github.com/users/DavidOliver/orgs","repos_url":"https://api.github.com/users/DavidOliver/repos","events_url":"https://api.github.com/users/DavidOliver/events{/privacy}","received_events_url":"https://api.github.com/users/DavidOliver/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-06T16:13:40Z","updated_at":"2015-08-06T16:48:52Z","closed_at":"2015-08-06T16:48:52Z","body":"Hello. Thanks very much for `clean-css`!\r\n\r\nI'm trying to use `npm run` as a build tool but am getting an error when running `clean-css` with [postcss-cli](https://github.com/code42day/postcss-cli). My `package.json`:\r\n\r\n    {\r\n      // ...\r\n      \"scripts\": {\r\n        \"styles\": \"stylus --include-css --resolve-url --use ./node_modules/rupture -I public/vendor --out public/css app/frontend/styles/*.styl\",\r\n        \"poststyles\": \"postcss --use clean-css --output public/css/app.css public/css/main.css\"\r\n      }\r\n    }\r\n\r\nThis `styles` script runs fine, but `poststyles` (which uses just `postcss` for now) results in:\r\n\r\n> how2@2.8.0 poststyles /srv/www/how2/project\r\n    > postcss --use clean-css --output public/css/app.css public/css/main.css\r\n\r\n    [TypeError: undefined is not a function]\r\n\r\n    npm ERR! Linux 3.13.0-61-generic\r\n    npm ERR! argv \"/usr/bin/node\" \"/usr/bin/npm\" \"run\" \"styles\"\r\n    npm ERR! node v0.12.7\r\n    npm ERR! npm  v2.11.3\r\n    npm ERR! code ELIFECYCLE\r\n    npm ERR! how2@2.8.0 poststyles: `postcss --use clean-css --output public/css/app.css public/css/main.css`\r\n    npm ERR! Exit status 1\r\n    npm ERR! \r\n    npm ERR! Failed at the how2@2.8.0 poststyles script 'postcss --use clean-css --output public/css/app.css public/css/main.css'.\r\n    npm ERR! This is most likely a problem with the how2 package,\r\n    npm ERR! not with npm itself.\r\n    npm ERR! Tell the author that this fails on your system:\r\n    npm ERR!     postcss --use clean-css --output public/css/app.css public/css/main.css\r\n    npm ERR! You can get their info via:\r\n    npm ERR!     npm owner ls how2\r\n    npm ERR! There is likely additional logging output above.\r\n\r\n    npm ERR! Please include the following file with any support request:\r\n    npm ERR!     /srv/www/how2/project/npm-debug.log\r\n\r\n`npm-debug.log`:\r\n\r\n    0 info it worked if it ends with ok\r\n    1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'styles' ]\r\n    2 info using npm@2.11.3\r\n    3 info using node@v0.12.7\r\n    4 verbose node symlink /usr/bin/node\r\n    5 verbose run-script [ 'prestyles', 'styles', 'poststyles' ]\r\n    6 info prestyles how2@2.8.0\r\n    7 info styles how2@2.8.0\r\n    8 verbose unsafe-perm in lifecycle true\r\n    9 info poststyles how2@2.8.0\r\n    10 verbose unsafe-perm in lifecycle true\r\n    11 info how2@2.8.0 Failed to exec poststyles script\r\n    12 verbose stack Error: how2@2.8.0 poststyles: `postcss --use clean-css --output public/css/app.css public/css/main.css`\r\n    12 verbose stack Exit status 1\r\n    12 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:213:16)\r\n    12 verbose stack     at EventEmitter.emit (events.js:110:17)\r\n    12 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:24:14)\r\n    12 verbose stack     at ChildProcess.emit (events.js:110:17)\r\n    12 verbose stack     at maybeClose (child_process.js:1015:16)\r\n    12 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1087:5)\r\n    13 verbose pkgid how2@2.8.0\r\n    14 verbose cwd /srv/www/how2/project\r\n    15 error Linux 3.13.0-61-generic\r\n    16 error argv \"/usr/bin/node\" \"/usr/bin/npm\" \"run\" \"styles\"\r\n    17 error node v0.12.7\r\n    18 error npm  v2.11.3\r\n    19 error code ELIFECYCLE\r\n    20 error how2@2.8.0 poststyles: `postcss --use clean-css --output public/css/app.css public/css/main.css`\r\n    20 error Exit status 1\r\n    21 error Failed at the how2@2.8.0 poststyles script 'postcss --use clean-css --output public/css/app.css public/css/main.css'.\r\n    21 error This is most likely a problem with the how2 package,\r\n    21 error not with npm itself.\r\n    21 error Tell the author that this fails on your system:\r\n    21 error     postcss --use clean-css --output public/css/app.css public/css/main.css\r\n    21 error You can get their info via:\r\n    21 error     npm owner ls how2\r\n    21 error There is likely additional logging output above.\r\n    22 verbose exit [ 1, true ]\r\n\r\nIs this a bug or am I doing something wrong?\r\n\r\nIf I use `--use cleancss` instead of `--use clean-css` I get `Error: Cannot find module 'cleancss'`."}}