forked from miracles1919/create-next-app-antd
-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
If upgrade Next.js to version 14.1
the "with-nextjs-inline-style" example crashed with:
⨯ /usr/source/test/antd/ant-design-examples/examples/with-nextjs-inline-style/node_modules/@ant-design/icons/es/components/Context.js:1
import { createContext } from 'react';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1178:20)
at Module._compile (node:internal/modules/cjs/loader:1220:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at mod.require (/usr/source/test/antd/ant-design-examples/examples/with-nextjs-inline-style/node_modules/next/dist/server/require-hook.js:65:28)
at require (node:internal/modules/cjs/helpers:119:18)
at @ant-design/icons/es/components/Context (/usr/source/test/antd/ant-design-examples/examples/with-nextjs-inline-style/.next/server/pages/_app.js:87:18)
at __webpack_require__ (/usr/source/test/antd/ant-design-examples/examples/with-nextjs-inline-style/.next/server/webpack-runtime.js:33:42)
at eval (webpack-internal:///./node_modules/antd/es/config-provider/index.js:16:97)
at ./node_modules/antd/es/config-provider/index.js (/usr/source/test/antd/ant-design-examples/examples/with-nextjs-inline-style/.next/server/vendor-chunks/antd.js:460:1)
at __webpack_require__ (/usr/source/test/antd/ant-design-examples/examples/with-nextjs-inline-style/.next/server/webpack-runtime.js:33:42)
at eval (webpack-internal:///__barrel_optimize__?names=ConfigProvider!=!./node_modules/antd/es/index.js:5:74)
It all works with Next.js version 13.5.6
nuwak and jpainam
Metadata
Metadata
Assignees
Labels
No labels