Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Provider npm does not support features install_options #183

Closed
yesoreyeram opened this issue Aug 1, 2018 · 2 comments
Closed

Provider npm does not support features install_options #183

yesoreyeram opened this issue Aug 1, 2018 · 2 comments

Comments

@yesoreyeram
Copy link

I am trying to install a node package globally via package provider. Unforturnately it doesnt support install_options. I am getting the following error.

Debug: /Package[npm-http-server]: Provider npm does not support features install_options; not managing attribute install_option
Debug: /Package[npm-http-server]: Provider npm does not support features virtual_packages; not managing attribute allow_virtual

My manifest looks like below

class profiles::app::base::nodejs {
  class { 'nodejs':
    target_dir => '/bin',
    version => 'v8.9.4',
  }
  package { 'npm-http-server':  
    name => 'http-server',
    provider => 'npm',
    install_options => ['-g', { '--prefix' => '/'}],
    require  => Class['nodejs']
  }
}

Operating System : Centos 7 (with vagrant on windows 10)
User : Admin
Module version : mod 'willdurand-nodejs', '2.0.2'
Puppet : Masterless puppet version 4.10.12

My aim is to install the module globally in /lib/node-modules/ folder and to create symlinks in /bin folder.
Am i doing it in wrong way? Any workaround /fix?

@Ma27
Copy link
Collaborator

Ma27 commented Aug 1, 2018

Hi @yesoreyeram!

I'm sorry you've experienced issues with this module! The npm provider is ony of the older pieces of this module and I'm not sure if anybody tried to use install_options with it.

Please give me some time to investigate, I'll report back in case I've found a workaround or a fix!

@Ma27 Ma27 closed this as completed in f03298f Aug 2, 2018
@Ma27
Copy link
Collaborator

Ma27 commented Aug 2, 2018

I just pushed a fix to master and included support for uninstall_options as well.
It worked fine for me, please test it locally, then i'd prepare a bugfix release :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants