<p dir="auto">If I'm not at the right place for this issue, I apologize. Not sure where to get started to solve this error message.</p>
<h3 dir="auto">Problem description</h3>
<ul dir="auto">
<li>a nextjs app which was made from <a href="https://github.com/zeit/next.js/tree/master/examples/with-material-ui-next">with-material-ui-next</a>, you can find the app having the issue here <a href="https://github.com/astenmies/next-library-starter">next-library-starter</a></li>
<li>a npm package called <a href="https://github.com/astenmies/next.js-library">next-library</a> which depends on material-ui and is a dependency of next-library-starter (see The Goal below)</li>
<li>everything works great, except I'm receiving an error message for each material-ui component.</li>
</ul>
<h3 dir="auto">Error messages</h3>
<p dir="auto"><strong>Warning: Failed context type: Invalid context <code class="notranslate">64a55d578f856d258dc345b094a2a2b3</code> of type <code class="notranslate">Jss</code> supplied to <code class="notranslate">withStyles(ButtonBase)</code>, expected instance of <code class="notranslate">Jss</code>.</strong></p>
<p dir="auto"><strong>Warning: Failed context type: Invalid context <code class="notranslate">d4bd0baacbc52bbd48bbb9eb24344ecd</code> of type <code class="notranslate">SheetsRegistry</code> supplied to <code class="notranslate">withStyles(TouchRipple)</code>, expected instance of <code class="notranslate">SheetsRegistry</code>.</strong></p>
<h3 dir="auto">The goal</h3>
<p dir="auto">The goal is to have that npm library with material-ui in order to quickly get started with new projects. This stuff is slightly beyond my understanding of npm packages &amp; webpack and I might not be doing it the right way, if so, please kindly advise.</p>
<h3 dir="auto">Steps to reproduce</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="git clone https://github.com/astenmies/next-library-starter.git &amp;&amp; cd next-library-starter &amp;&amp; yarn &amp;&amp; yarn run dev"><pre class="notranslate"><code class="notranslate">git clone https://github.com/astenmies/next-library-starter.git &amp;&amp; cd next-library-starter &amp;&amp; yarn &amp;&amp; yarn run dev
</code></pre></div>
<h3 dir="auto">Versions</h3>
<ul dir="auto">
<li>Material-UI: next</li>
<li>React: 15.6.1</li>
<li>Browser: Chrome</li>
</ul>
<h2 dir="auto">Context</h2>

<p dir="auto">According to <a href="https://material-ui-1dab0.firebaseapp.com/customization/css-in-js/#jss" rel="nofollow">docs</a>, Material-UI uses the <code class="notranslate">jss-preset-default</code> module. Which is not true since <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="273727444" data-permission-text="Title is private" data-url="https://github.com/mui/material-ui/issues/9129" data-hovercard-type="pull_request" data-hovercard-url="/mui/material-ui/pull/9129/hovercard" href="https://github.com/mui/material-ui/pull/9129">#9129</a> was merged.</p>
<p dir="auto">Also, <code class="notranslate">jss-preset-default</code> plugin is <a href="https://github.com/mui-org/material-ui/blob/v1-beta/package.json#L72">listed in package.json</a> - it suggests that all <code class="notranslate">jss-preset-default</code> plugins are supported, which is not true.</p>
<p dir="auto">My suggestion is to remove <code class="notranslate">jss-preset-default</code> from package.json and add <a href="https://github.com/mui-org/material-ui/blob/v1-beta/src/styles/withStyles.js#L8">list plugins which are used</a> instead.<br>
Also, docs should be updated and probably examples too (e.g. <a href="https://github.com/mui-org/material-ui/blob/5d3fb197da4c79cf2ef1272c3c248dcbf2875bae/examples/create-react-app-with-jss/src/withRoot.js">this one</a>).</p>
<p dir="auto">I can submit a PR if needed</p>