Skip to content

Using @bundle/package@version with npm keeps installing the packages #433

Description

@delinuxspecialist

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.5.18
  • Ruby: ?
  • Distribution: CentOS 7
  • Module version: 8.1.0

How to reproduce (e.g Puppet code you use)

$mypackages = ["@molgenis-ui/app-manager@0.1.4","@molgenis-ui/core-ui@0.3.1",
"@molgenis-ui/legacy-lib@1.1.2","@molgenis-ui/data-row-edit@3.0.3",
"@molgenis-ui/metadata-manager@0.1.8","@molgenis-ui/navigator@0.1.3",
"@molgenis-ui/one-click-importer@0.1.4","@molgenis-ui/questionnaires@2.0.5",
"@molgenis-ui/security@0.2.0","@molgenis-ui/settings@2.0.2"]
nodejs::npm { $mypackages:
ensure => 'present',
target => '/var/www/html/molgenis',
}

What are you seeing

Reinstalling the packages on every puppet run

What behaviour did you expect instead

Only once installing.

Output log

Notice: /Stage[main]/Profile::Molgenis_nodejs/Nodejs::Npm[@molgenis-ui/app-manager@0.1.4]/Exec[npm_install_@molgenis-ui/app-manager@0.1.4]/returns: executed successfully (corrective)
Notice: /Stage[main]/Profile::Molgenis_nodejs/Nodejs::Npm[@molgenis-ui/core-ui@0.3.1]/Exec[npm_install_@molgenis-ui/core-ui@0.3.1]/returns: executed successfully (corrective)
Notice: /Stage[main]/Profile::Molgenis_nodejs/Nodejs::Npm[@molgenis-ui/legacy-lib@1.1.2]/Exec[npm_install_@molgenis-ui/legacy-lib@1.1.2]/returns: executed successfully (corrective)
Notice: /Stage[main]/Profile::Molgenis_nodejs/Nodejs::Npm[@molgenis-ui/data-row-edit@3.0.3]/Exec[npm_install_@molgenis-ui/data-row-edit@3.0.3]/returns: executed successfully (corrective)
Notice: /Stage[main]/Profile::Molgenis_nodejs/Nodejs::Npm[@molgenis-ui/metadata-manager@0.1.8]/Exec[npm_install_@molgenis-ui/metadata-manager@0.1.8]/returns: executed successfully (corrective)
Notice: /Stage[main]/Profile::Molgenis_nodejs/Nodejs::Npm[@molgenis-ui/navigator@0.1.3]/Exec[npm_install_@molgenis-ui/navigator@0.1.3]/returns: executed successfully (corrective)
Notice: /Stage[main]/Profile::Molgenis_nodejs/Nodejs::Npm[@molgenis-ui/one-click-importer@0.1.4]/Exec[npm_install_@molgenis-ui/one-click-importer@0.1.4]/returns: executed successfully (corrective)
Notice: /Stage[main]/Profile::Molgenis_nodejs/Nodejs::Npm[@molgenis-ui/questionnaires@2.0.5]/Exec[npm_install_@molgenis-ui/questionnaires@2.0.5]/returns: executed successfully (corrective)
Notice: /Stage[main]/Profile::Molgenis_nodejs/Nodejs::Npm[@molgenis-ui/scripts@2.0.2]/Exec[npm_install_@molgenis-ui/scripts@2.0.2]/returns: executed successfully (corrective)
Notice: /Stage[main]/Profile::Molgenis_nodejs/Nodejs::Npm[@molgenis-ui/searchall@0.1.4]/Exec[npm_install_@molgenis-ui/searchall@0.1.4]/returns: executed successfully (corrective)
Notice: /Stage[main]/Profile::Molgenis_nodejs/Nodejs::Npm[@molgenis-ui/security@0.2.0]/Exec[npm_install_@molgenis-ui/security@0.2.0]/returns: executed successfully (corrective)
Notice: /Stage[main]/Profile::Molgenis_nodejs/Nodejs::Npm[@molgenis-ui/settings@2.0.2]/Exec[npm_install_@molgenis-ui/settings@2.0.2]/returns: executed successfully (corrective)

Any additional information you'd like to impart

I think the issue lies in the part where the module checks if the package is already installed, the version number after the last '@' is the reason it thinks the package is not installed. Same goes for the comment in Nodejs/npm when you specify 'latest' as a version number.

I worked around it by specifying every package with a version number like :
nodejs::npm { '@molgenis-ui/app-manager':
ensure => '0.1.4',
target => '/var/www/html/molgenis',
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions