-
-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use npm to install a specific npm version #160
Comments
|
Can you try: nodejs::npm { 'npm':
ensure => 'version',
provider => npm,
} |
|
Looks like that errors out: Looking at the nodejs::npm defined type shows that there isn't a provider parameter. I tried this also: But that also dies, trying to install npm from the default package manager, instead of from npm. |
|
Oh right maybe: package { 'npm':
ensure => '2.13.4',
provider => npm,
} |
|
That's what I tried at first, but I got a duplicate resource error because Package[npm] is already defined in install.pp on line 49. Now that I look at it again, maybe I can set $nodejs::npm_package_name to undef and then that whole package section won't be in affect. |
|
Hmm, I tried this, but I still got |
|
That makes sense. This is a legitimate deficiency in the software, and one that affects me as well. |
|
This would only be achievable in Puppet > 4 😢 In Puppet > 4: class profile::appserver::nodejstools {
include nodejs
package { "npm-installed-with-npm":
name => "npm",
provider => "npm",
ensure => "2.13.4",
require => Class['nodejs'],
}
} |
|
any updates on this? My current workaround: |
Hey all,
I recently downloaded the nodejs module and I think it's really well done. I have run into a small feature request though. I'm using Ubuntu and the NodeSource packages, which (I believe) puts the npm binary in the same package as nodejs, instead of having 2 separate packages like the base Ubuntu packages.
I would like to be able to use npm to upgrade npm to a specific version. When I set $npm_package_ensure to be a specific version it errors out though because it's trying to install that version via the default provider instead of via the npm provider.
I'd love to add another variable that would allow you to override the provider for npm (something like $npm_provider). Are there any downsides to doing this? Is there a better way to get a specific version of npm using npm? I'd love any feedback that the community would like to share.
Thanx!
The text was updated successfully, but these errors were encountered: