title: Styled-components with npm link results in the error: "Trying to insert a new style tag, but the given Node is unmounted"
body: <p>I have created my own npm package (created with nwb) where I use styled-components. In my consuming app, I'm also using styled-components. </p>
  
  <p>The problem is. <em>Everything works fine when installing my npm package via</em> <code>npm install</code>. However, when using <code>npm link</code> the following error message occurs when entering to some other react-router route: </p>
  
  <pre><code>Error: Trying to insert a new style tag, but the given Node is unmounted!
  
  * Are you using a custom target that isn't mounted?
  * Does your document not have a valid head element?
  * Have you accidentally removed a style tag manually?
  </code></pre>
  
  <p>In my npm package I have set the styled-components as peer dependency and as devDependency as follows: </p>
  
  <pre><code>...
  "peerDependencies": {
    "react": "16.x",
    "styled-components": "^3.4.4"
  },
  "devDependencies": {
    "karma-junit-reporter": "^1.2.0",
    "nwb": "0.23.x",
    "react": "^16.4.2",
    "react-dom": "^16.4.2",
    "styled-components": "^3.4.4"
  },
  ...
  </code></pre>
  
  <p>Why styled-components fails to work when using <code>npm link</code>?</p>