<p dir="auto">When following the tutorial, I get a syntax error.</p>
<p dir="auto">Package.json:<br>
{<br>
"name": "<a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-version">next-version</a>",<br>
"version": "1.0.0",<br>
"description": "",<br>
"main": "index.js",<br>
"scripts": {<br>
"dev": "next"<br>
},<br>
"keywords": [],<br>
"author": "",<br>
"license": "ISC",<br>
"dependencies": {<br>
"next": "^6.0.0",<br>
"react": "^16.3.2",<br>
"react-dom": "^16.3.2"<br>
}<br>
}</p>
<p dir="auto">Console IO:<br>
Per-ivinds-MacBook-Pro:<a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-version">next-version</a> poa$ npm run dev</p>
<blockquote>
<p dir="auto">next-version@1.0.0 dev /Users/poa/Documents/dev/smileyhash/next-version<br>
next</p>
</blockquote>
<p dir="auto">/Users/poa/Documents/dev/smileyhash/<a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-version">next-version</a>/node_modules/update-check/index.js:18<br>
const getFile = async (details, distTag) =&gt; {<br>
^<br>
SyntaxError: Unexpected token (<br>
at Object.exports.runInThisContext (vm.js:78:16)<br>
at Module._compile (module.js:543:28)<br>
at Object.Module._extensions..js (module.js:580:10)<br>
at Module.load (module.js:488:32)<br>
at tryModuleLoad (module.js:447:12)<br>
at Function.Module._load (module.js:439:3)<br>
at Module.require (module.js:498:17)<br>
at require (internal/module.js:20:19)<br>
at Server._callee$ (/Users/poa/Documents/dev/smileyhash/<a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-version">next-version</a>/node_modules/next/dist/server/index.js:194:34)<br>
at tryCatch (/Users/poa/Documents/dev/smileyhash/<a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-version">next-version</a>/node_modules/regenerator-runtime/runtime.js:62:40)<br>
at Generator.invoke [as _invoke] (/Users/poa/Documents/dev/smileyhash/<a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-version">next-version</a>/node_modules/regenerator-runtime/runtime.js:296:22)<br>
at Generator.prototype.(anonymous function) [as next] (/Users/poa/Documents/dev/smileyhash/<a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-version">next-version</a>/node_modules/regenerator-runtime/runtime.js:114:21)<br>
at step (/Users/poa/Documents/dev/smileyhash/<a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-version">next-version</a>/node_modules/@babel/runtime/helpers/asyncToGenerator.js:12:30)<br>
at _next (/Users/poa/Documents/dev/smileyhash/<a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-version">next-version</a>/node_modules/@babel/runtime/helpers/asyncToGenerator.js:27:9)<br>
at /Users/poa/Documents/dev/smileyhash/<a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-version">next-version</a>/node_modules/@babel/runtime/helpers/asyncToGenerator.js:34:7<br>
at F (/Users/poa/Documents/dev/smileyhash/<a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-version">next-version</a>/node_modules/core-js/library/modules/_export.js:36:28)</p>
<p dir="auto">npm ERR! Darwin 17.5.0<br>
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dev"<br>
npm ERR! node v7.2.0<br>
npm ERR! npm  v3.10.9<br>
npm ERR! code ELIFECYCLE<br>
npm ERR! <a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-version">next-version</a>@1.0.0 dev: <code class="notranslate">next</code><br>
npm ERR! Exit status 1<br>
npm ERR!<br>
npm ERR! Failed at the <a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-version">next-version</a>@1.0.0 dev script 'next'.<br>
npm ERR! Make sure you have the latest version of node.js and npm installed.<br>
npm ERR! If you do, this is most likely a problem with the <a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-version">next-version</a> package,<br>
npm ERR! not with npm itself.<br>
npm ERR! Tell the author that this fails on your system:<br>
npm ERR!     next<br>
npm ERR! You can get information on how to open an issue for this project with:<br>
npm ERR!     npm bugs <a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-version">next-version</a><br>
npm ERR! Or if that isn't available, you can get their info via:<br>
npm ERR!     npm owner ls <a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-version">next-version</a><br>
npm ERR! There is likely additional logging output above.</p>
<p dir="auto">npm ERR! Please include the following file with any support request:<br>
npm ERR!     /Users/poa/Documents/dev/smileyhash/<a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-version">next-version</a>/npm-debug.log<br>
Per-ivinds-MacBook-Pro:<a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-version">next-version</a> poa$</p>




<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/zeit/next.js/issues?q=is%3Aissue">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>


<h2 dir="auto">Current Behavior</h2>


<h2 dir="auto">Steps to Reproduce (for bugs)</h2>


<ol dir="auto">
<li></li>
<li></li>
<li></li>
<li></li>
</ol>
<h2 dir="auto">Context</h2>


<h2 dir="auto">Your Environment</h2>

<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td></td>
</tr>
<tr>
<td>node</td>
<td></td>
</tr>
<tr>
<td>OS</td>
<td></td>
</tr>
<tr>
<td>browser</td>
<td></td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table>
<p dir="auto">Next.js has example and work with sw-precache as service-worker.</p>


<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>


<p dir="auto">It should be possible to use Workbox and workbox-webpack-plugin to create a service worker.</p>
<h2 dir="auto">Current Behavior</h2>


<p dir="auto">When adding following to next.config.js:</p>
<p dir="auto"><code class="notranslate">config.plugins.push(new WorkboxPlugin({ globDirectory: path.resolve('./.next/dist/'), globPatterns: ['**/*.{html,js,css}'], swDest: path.resolve('./static/sw/service-worker.js'), clientsClaim: true, skipWaiting: true, }))</code></p>
<p dir="auto">it fails with error:<br>
<code class="notranslate">Error: One of the glob patterns doesn't match any files. Please remove or fix the following: { "globDirectory": "/...../.next/dist", "globPattern": "**/*.{html,js,css}", "globIgnores": [ "node_modules/**/*", "../../static/sw/workbox-sw.prod.v2.1.2.js", "../../static/sw/service-worker.js" ] </code></p>
<h2 dir="auto">Your Environment</h2>

<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>4.2.0</td>
</tr>
<tr>
<td>node</td>
<td>8.9.0</td>
</tr>
</tbody>
</table>