Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-5220

npmrc modifies global prefix which is incompatible with nvm

    • 3
    • Not Needed
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Summary

      the Node.js CI download changes broke mongosh CI:

      https://github.com/mongodb/node-mongodb-native/blob/4b5be2121fdcca0879447be24e8e935dfcd14764/.evergreen/install-dependencies.sh#L96-L98

      makes installations that do use nvm fail with

      Your user's .npmrc file (${HOME}/.npmrc)
      has a `globalconfig` and/or a `prefix` setting, which are incompatible with nvm.
      

      Mongosh could add something like rm -f ~/.npmrc to our scripts, but it would make sense to address this in the driver scripts, since it is leaving a global npm config with a prefix pointing to a path that no longer exists (because that path does get cleaned up between tasks, I assume)

      NPM has env variables that can control the settings we need instead of needing to write an rc file: We should strive to use that.
      export npm_config_prefix=

        There are no Sub-Tasks for this issue.

            Assignee:
            bailey.pearson@mongodb.com Bailey Pearson
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: