voxpupuli / puppet-nodejs

Puppet module to install nodejs and global npm packages
https://forge.puppet.com/puppet/nodejs
Apache License 2.0
113 stars 247 forks source link

Provide option to install node using Brew #236

Closed amosshapira closed 6 years ago

amosshapira commented 8 years ago

When using the module to install Node on OSX, I get the following errors:

Error: /Package[nodejs]: Provider macports is not functional on this host
Error: /Package[nodejs-devel]: Provider macports is not functional on this host
Error: /Package[npm]: Provider macports is not functional on this host

I use Homebrew to install node on the system. I don't use Macports anywhere on our network. I need a way to tell the module to use Brew instead of Macports.

kizzie commented 7 years ago

So this seems to be annoyingly easy and really hard at the same time. To get it to use homebrew you can edit the params.pp file and change line 171 to read

Package { provider => 'homebrew' }

Problem is I can't think of an elegent way to let people set that value (so as to not change current functionality) as the params class doesn't take inputs and moving the entire case statement out of the params.pp seems a little extreme for a simple fix pull request.

kizzie commented 7 years ago

Have a vague idea at a PR - https://github.com/voxpupuli/puppet-nodejs/pull/321

Cause either I need to do one to update the macports package name (its now nodejs6|7|8 or allow for homebrew...)

juniorsysadmin commented 6 years ago

Fixed by #321