title: Cannot find module 'babel-runtime/regenerator' Import locally vs Import from NPM
body: <p>I'm working on an NPM module and I've been having issues with my babel configuration. I am using ES6, specifically with async / await, static class methods and import / export.</p>
  
  <p>At first, I got the common issue of: <code>ReferenceError: regeneratorRuntime is not defined</code>. I, therefore, installed <code>babel-plugin-transform-runtime</code> as a dev dependency and added it to the plugins in <code>.babelrc</code>. When requiring the module with either the path name or through npm as a dependency I ran into the error <code>Error: Cannot find module 'babel-runtime/regenerator'</code>. It seems that to resolve this I'd have to require <code>babel-runtime</code>, however, a lot of people seem to recommend not doing this when it's a module that you are publishing.</p>
  
  <p>After looking for some guides, I found one that suggested not using import / export, so I tried that. After building and requiring it locally it worked. However, when publishing to npm and importing as a dependency I continue to get the error: <code>Error: Cannot find module 'babel-runtime/regenerator'</code>.</p>
  
  <pre><code>  "devDependencies": {
      "babel-cli": "^6.26.0",
      "babel-eslint": "^10.0.1",
      "babel-plugin-transform-runtime": "^6.23.0",
      "babel-preset-env": "^1.7.0",
      "eslint": "^5.12.0",
      "eslint-config-prettier": "^3.4.0",
      "eslint-config-standard": "^12.0.0",
      "eslint-plugin-import": "^2.14.0",
      "eslint-plugin-node": "^8.0.1",
      "eslint-plugin-promise": "^4.0.1",
      "eslint-plugin-standard": "^4.0.0",
      "husky": "^1.3.1",
      "jest": "^23.6.0",
      "lint-staged": "^8.1.0",
      "nodemon": "^1.18.9",
      "prettier": "^1.15.3",
      "rimraf": "^2.6.3"
    },
  </code></pre>
  
  <pre><code>{
    "presets": [
      "env"
    ],
    plugins: [
      "babel-plugin-transform-runtime"
    ]
  }
  </code></pre>
  
  <p>Could someone suggest how to fix this / give some advice for using babel when publishing npm modules?</p>