Next.js: Antdesign ubuntu production build/start error

Created on 19 Apr 2019  路  1Comment  路  Source: vercel/next.js

Bug report

Describe the bug

There is an error when building an antdesign application (from the sample application) on ubuntu server 16.04. Which would work fine in the development machine (macOS)

To Reproduce

  1. Use ubuntu server 16.04
  2. create application with npx create-next-app --example with-ant-design with-ant-design-app
  3. cd with-ant-design
  4. npm run build
  5. npm run start
  6. error
    yarn run v1.15.2 $ next start > Ready on http://localhost:3000 TypeError: Cannot read property 'vertical' of undefined at Object.children (/home/cmmadnat/with-ant-design-app/node_modules/antd/lib/form/FormItem.js:400:30) at a.render (/home/cmmadnat/with-ant-design-app/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:44:64) at a.read (/home/cmmadnat/with-ant-design-app/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:41:58) at renderToString (/home/cmmadnat/with-ant-design-app/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:53:83) at render (/home/cmmadnat/with-ant-design-app/node_modules/next-server/dist/server/render.js:86:16) at renderPage (/home/cmmadnat/with-ant-design-app/node_modules/next-server/dist/server/render.js:211:20) at Function.value (/home/cmmadnat/with-ant-design-app/.next/server/static/lNpO-P56gmywawReyZYO4/pages/_document.js:996:41) at Object.loadGetInitialProps (/home/cmmadnat/with-ant-design-app/node_modules/next-server/dist/lib/utils.js:42:35) at Object.renderToHTML (/home/cmmadnat/with-ant-design-app/node_modules/next-server/dist/server/render.js:218:36) at processTicksAndRejections (internal/process/task_queues.js:86:5)

Expected behavior

No error on the ubuntu server

Screenshots

Screen Shot 2562-04-19 at 12 43 07

System information

  • OS: ubuntu server 16.04
  • Browser: Any
  • Version of Next.js: 8.1.0

Additional context

Everything works fine on macOS, just the build on ubuntu server would cause an error everytime (including my other application with antdesign, break the same way)
Although, running npm run dev works fine

Most helpful comment

Downgrading to 8.0.4 works for me

>All comments

Downgrading to 8.0.4 works for me

Was this page helpful?
0 / 5 - 0 ratings