Git Product home page Git Product logo

Comments (10)

dandunckelman avatar dandunckelman commented on June 6, 2024

Not sure that it makes a difference, but I've also had the nodejs class like this:

class { '::nodejs': }->

and had the same results

from puppet-nodejs.

jyaworski avatar jyaworski commented on June 6, 2024

AFAIK, you can't have a require relationship on a define.

However, it does seem like we should add an include ::nodejs to that define.

from puppet-nodejs.

rnelson0 avatar rnelson0 commented on June 6, 2024

Maybe split into two subclasses and contain them. Then order the two,
Class[a] -> Class [b]. You could try the spaceship collector but it's
possible a resource in the class will be out orpf order, unless you contain
the whole thing.

Rob Nelson
[email protected]

from puppet-nodejs.

juniorsysadmin avatar juniorsysadmin commented on June 6, 2024

@dandunckelman Is this still an issue with the latest release?

from puppet-nodejs.

dandunckelman avatar dandunckelman commented on June 6, 2024

@juniorsysadmin yes. On a 2nd puppet run, it is resolved...so it's not a deal breaker

from puppet-nodejs.

jyaworski avatar jyaworski commented on June 6, 2024

Tagging @ghoneycutt as this looks like the problem that #221 was supposed to solve.

from puppet-nodejs.

ghoneycutt avatar ghoneycutt commented on June 6, 2024

You shouldn't need the arrow syntax. The define will include the nodejs class. You are mixing include ::nodejs which happens in the define with the parameterized class syntax. Perhaps that is causing you trouble.

from puppet-nodejs.

dandunckelman avatar dandunckelman commented on June 6, 2024

I've since updated my class to this:

class ta_linux::ta_nodejs(
  $npm_packages = {},
) {
  validate_hash($npm_packages)

  $npm_package_defaults = {
    'provider' => 'npm',
    'require'  => Class['nodejs'],
  }

  class { 'nodejs': }

  nodejs::npm::global_config_entry { 'strict-ssl':
    ensure => present,
    value  => false,
  }

  Class['::nodejs'] -> Package <| provider == 'npm' |>

  create_resources(package, $npm_packages, $npm_package_defaults)
}

and still receive the error on the first run when the ta_linux::ta_nodejs class is loaded by another class like this:

class ta_apps::portal_web() {
  # other stuff to install packages, rvm, apache, and other stuff

  class { 'ta_linux::ta_nodejs':
    npm_packages => {
      'forever' => {
        'ensure' => hiera("pkg_ensure_forever"),
      },
    },
  }
}

from puppet-nodejs.

juniorsysadmin avatar juniorsysadmin commented on June 6, 2024

Can anyone else report that this is still occurring?

from puppet-nodejs.

juniorsysadmin avatar juniorsysadmin commented on June 6, 2024

Closing due to no further reports providing confirmation of a bug.

from puppet-nodejs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.