Chassis / nodejs

A Chassis extension to install Node.js
2 stars 3 forks source link

Switch to the Puppet Forge NodeJS module #11

Open ntwb opened 7 years ago

ntwb commented 7 years ago

Chassis NodeJS should switch to https://forge.puppet.com/puppet/nodejs

Some of the benefits: • Makes available a global npm provider which benefits Chassis/grunt & Chassis/bower extensions • Primary NodeJS source package continues to be provided by https://nodesource.com/ • Supports .npmrc files • Supports globally installing packages (edited)

BronsonQuick commented 7 years ago

I had a bit of a crack at this tonight but I got stuck 😢 My gut feeling is that the version of puppet that precise64 ships with is out of date and this Puppet Forge module is expecting at last 4.x.x and not 3.8.x. That might be wrong though. I'll try and have another go at this later this week.

ntwb commented 7 years ago

Thanks for taking a stab at it 🔪

The modules docs state: Puppet >=3.8.7 < 5.0.0

Having not tried creating a fix for this, I did bookmark the following, hoping it would give me a headstart: https://github.com/jherbage/puppet-conf/blob/master/manifests/nodejs.pp

BronsonQuick commented 7 years ago

Hrm. We're on 3.8.7so maybe it was just PEBKAC or maybe it's a ruby dependency. Hopefully I'll learn more later in the week.

johnbillion commented 6 years ago

Can this be done since https://github.com/Chassis/Chassis/pull/312 was merged?

johnbillion commented 6 years ago

Background: I'd really like npm available in order to run things like npm test within the Chassis VM.

BronsonQuick commented 6 years ago

Hey @johnbillion! You shouldn't need us to switch to Puppet Forge NodeJS for this to get npm installed.

If you add:

extensions:
  - chassis/nodejs

To one of your yaml files you will get the following inside your VM after a vagrant provision: chassis__vagrantvagrant___ssh__vagrant_ssh_2018-02-14_18-14-20

Sometimes the formatting of the yaml file can cause issues. I've often caught myself up but not uncommenting extensions: so it's been #extensions: and if that's the case your extensions won't be installed and provisioned.

If you're still stuck with this then please send me your yaml files so I can try and replicate it and give you a fix for it!