{"action":"created","issue":{"url":"https://api.github.com/repos/less/less.js/issues/2915","repository_url":"https://api.github.com/repos/less/less.js","labels_url":"https://api.github.com/repos/less/less.js/issues/2915/labels{/name}","comments_url":"https://api.github.com/repos/less/less.js/issues/2915/comments","events_url":"https://api.github.com/repos/less/less.js/issues/2915/events","html_url":"https://github.com/less/less.js/issues/2915","id":162566693,"number":2915,"title":"\"plugin.install is not a function\" when trying to add plugins to node script","user":{"login":"josh18","id":5900962,"avatar_url":"https://avatars.githubusercontent.com/u/5900962?v=3","gravatar_id":"","url":"https://api.github.com/users/josh18","html_url":"https://github.com/josh18","followers_url":"https://api.github.com/users/josh18/followers","following_url":"https://api.github.com/users/josh18/following{/other_user}","gists_url":"https://api.github.com/users/josh18/gists{/gist_id}","starred_url":"https://api.github.com/users/josh18/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josh18/subscriptions","organizations_url":"https://api.github.com/users/josh18/orgs","repos_url":"https://api.github.com/users/josh18/repos","events_url":"https://api.github.com/users/josh18/events{/privacy}","received_events_url":"https://api.github.com/users/josh18/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-06-27T22:54:29Z","updated_at":"2016-06-29T21:48:18Z","closed_at":"2016-06-29T21:41:25Z","body":"Trying to get less working from a node script but I get this error message when trying to add a plugin.\r\n\r\n```\r\n.../npm-scripts/node_modules/less/lib/less/plugin-manager.js:29\r\n    plugin.install(this.less, this);\r\n           ^\r\n\r\nTypeError: plugin.install is not a function\r\n    at PluginManager.addPlugin (.../npm-scripts/node_modules/less/lib/less/plugin-manager.js:29:12)\r\n    at PluginManager.addPlugins (.../npm-scripts/node_modules/less/lib/less/plugin-manager.js:19:18)\r\n    at Object.parse (.../npm-scripts/node_modules/less/lib/less/parse.js:34:27)\r\n    at Object.render (.../npm-scripts/node_modules/less/lib/less/render.js:25:18)\r\n    at .../npm-scripts/less-watch.js:27:14\r\n    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:405:3)\r\n```\r\n\r\nTried with `less-plugin-autoprefix` and with `less-plugin-clean-css`. Any idea what could be causing this? I'm not doing anything strange (that I know of), my code is pretty much just:\r\n\r\n```js\r\nvar lessOptions = {\r\n    plugins: [lessAutoPrefix]\r\n};\r\n\r\nless.render(data, lessOptions, function(error, output) {\r\n    // do stuff\r\n});\r\n```\r\nWithout the plugins option everything works fine. It also works fine when doing the same thing from the command line. Just installed all the modules so everything should be up to date."},"comment":{"url":"https://api.github.com/repos/less/less.js/issues/comments/229499464","html_url":"https://github.com/less/less.js/issues/2915#issuecomment-229499464","issue_url":"https://api.github.com/repos/less/less.js/issues/2915","id":229499464,"user":{"login":"matthew-dean","id":414752,"avatar_url":"https://avatars.githubusercontent.com/u/414752?v=3","gravatar_id":"","url":"https://api.github.com/users/matthew-dean","html_url":"https://github.com/matthew-dean","followers_url":"https://api.github.com/users/matthew-dean/followers","following_url":"https://api.github.com/users/matthew-dean/following{/other_user}","gists_url":"https://api.github.com/users/matthew-dean/gists{/gist_id}","starred_url":"https://api.github.com/users/matthew-dean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthew-dean/subscriptions","organizations_url":"https://api.github.com/users/matthew-dean/orgs","repos_url":"https://api.github.com/users/matthew-dean/repos","events_url":"https://api.github.com/users/matthew-dean/events{/privacy}","received_events_url":"https://api.github.com/users/matthew-dean/received_events","type":"User","site_admin":false},"created_at":"2016-06-29T21:48:17Z","updated_at":"2016-06-29T21:48:17Z","body":"@seven-phases-max I would say that based on the plugin documentation, plugins are actually not (strictly) following what Less is supporting, which is that a plugin returns an object with a certain signature, and not a function that can produce said object.\r\n\r\nSo I wouldn't say the example needs to be updated so much as the plugins need to be updated, as they're not returning a properly formed object with required properties. They're returning a function."}}
{"actor":{"display_login":"matthew-dean"}}