Last hotfix version breaks the zeit.co build.
Update to next.js version 9.3.2 and try to deploy your application via zeit.co. The next build step fails with:
Automatically optimizing pages...
> Build error occurred
_error_Error {
props: "Cannot find module 'private-next-pages/index.spec.tsx'",
context: undefined,
refs: {},
updater: {
isMounted: [Function: isMounted],
enqueueForceUpdate: [Function: enqueueForceUpdate],
enqueueReplaceState: [Function: enqueueReplaceState],
enqueueSetState: [Function: enqueueSetState]
},
code: 'MODULE_NOT_FOUND'
}
...
Steps to reproduce the behavior, please provide code snippets or a repository:
It should just work as before. After downgrade, it works again.
What version were you on before? Do you have a deployment url we can look at?
next version 9.3.2 [failed]
https://zeit.co/explore-the-world/explore-the-world-frontend/8tdgarvat
next version 9.3.1 [succeeded]
https://zeit.co/explore-the-world/explore-the-world-frontend/8poo9uulh
This error breaks also examples. I just copied blog-starter. Run npm install then npm run build and got this error:
Creating an optimized production build ..fs.js:885
return binding.mkdir(pathModule._makeLong(path),
^
Error: EEXIST: file already exists, mkdir '/home/polonium/www/cyclone/blog-starter/.next/cache/next-minifier'
at fs.mkdirSync (fs.js:885:18)
at new TaskRunner (/home/polonium/www/cyclone/blog-starter/node_modules/next/dist/build/webpack/plugins/terser-webpack-plugin/src/TaskRunner.js:1:634)
at TerserPlugin.optimizeFn (/home/polonium/www/cyclone/blog-starter/node_modules/next/dist/build/webpack/plugins/terser-webpack-plugin/src/index.js:6:1316)
at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/polonium/www/cyclone/blog-starter/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:21:1)
at AsyncSeriesHook.lazyCompileHook (/home/polonium/www/cyclone/blog-starter/node_modules/tapable/lib/Hook.js:154:20)
at hooks.additionalAssets.callAsync.err (/home/polonium/www/cyclone/blog-starter/node_modules/webpack/lib/Compilation.js:1409:36)
at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/polonium/www/cyclone/blog-starter/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
at AsyncSeriesHook.lazyCompileHook (/home/polonium/www/cyclone/blog-starter/node_modules/tapable/lib/Hook.js:154:20)
at hooks.optimizeTree.callAsync.err (/home/polonium/www/cyclone/blog-starter/node_modules/webpack/lib/Compilation.js:1405:32)
at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/polonium/www/cyclone/blog-starter/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `next build`
npm ERR! Exit status 1
While attempting to deploy using next@^9.1.6 on Heroku I came across the same error!
Resolved by upgrading to [email protected]. Really weird. Have deployed many Next apps on Heroku using 9.1.6.
now, the 9.3.1 fails as well :/
works with 9.3.4 馃憤
Most helpful comment
This error breaks also examples. I just copied blog-starter. Run
npm installthennpm run buildand got this error: