diff --git a/lib/bb/fetch2/npm.py b/lib/bb/fetch2/npm.py
index c09f05044..7486049b8 100644
--- a/lib/bb/fetch2/npm.py
+++ b/lib/bb/fetch2/npm.py
@@ -107,6 +107,22 @@ class NpmEnvironment(object):
         """Run npm command in a controlled environment"""
         with tempfile.TemporaryDirectory() as tmpdir:
             d = bb.data.createCopy(self.d)
+
+            # If the user opts to use their own NPMRC file, then use it within the NPM environment
+            # (along with the user provided configs). Otherwise, leave it blank.
+            if d.getVar("BB_USE_HOME_NPMRC_FILE") == "1":
+                home_npmrc_file = os.path.join(os.environ.get("HOME"), ".npmrc")
+                tmp_npmrc_file = os.path.join(tmpdir, ".npmrc")
+                bb.warn("BB_USE_HOME_NPMRC_FILE flag is set - NPM fetcher will now use the .npmrc file in the HOME directory.")
+                if os.path.exists(home_npmrc_file):
+                    bb.utils.copyfile(home_npmrc_file, tmp_npmrc_file)
+                    # Still need to append the contents of the user config created in __init__
+                    with open(tmp_npmrc_file, 'a') as t:
+                        with open(self.user_config.name, 'r') as u:
+                            t.write(u.read())
+                            t.flush()
+                    self.user_config.name = tmp_npmrc_file
+
             d.setVar("PATH", d.getVar("PATH"))  # PATH might contain $HOME - evaluate it before patching
             d.setVar("HOME", tmpdir)
 
