ant-design-icons
ant-design-icons copied to clipboard
Cannot use import statement outside a module
Next.js
Operating System:
Platform: darwin
Arch: x64
Version: Darwin Kernel Version 20.6.0: Thu Jul 6 22:12:47 PDT 2023; root:xnu-7195.141.49.702.12~1/RELEASE_X86_64
Binaries:
Node: 18.18.2
npm: 9.8.1
Yarn: 1.22.19
pnpm: 7.16.0
Relevant Packages:
next: 14.1.0
eslint-config-next: 14.1.0
react: 18.2.0
react-dom: 18.2.0
typescript: 5.2.2
Next.js Config:
output: standalone
antd
"@ant-design/icons": "^5.2.6",
"antd": "^5.13.1",
Next.js
Operating System: Platform: darwin Arch: x64 Version: Darwin Kernel Version 20.6.0: Thu Jul 6 22:12:47 PDT 2023; root:xnu-7195.141.49.702.12~1/RELEASE_X86_64 Binaries: Node: 18.18.2 npm: 9.8.1 Yarn: 1.22.19 pnpm: 7.16.0 Relevant Packages: next: 14.1.0 eslint-config-next: 14.1.0 react: 18.2.0 react-dom: 18.2.0 typescript: 5.2.2 Next.js Config: output: standalone
antd
"@ant-design/icons": "^5.2.6", "antd": "^5.13.1",
@afc163 可以帮忙看看什么原因吗?
I have same issue. Is this issue still unresolved?
antd
"@ant-design/icons": "^5.3.0",
"antd": "^5.14.1",
If you are using nextjs 14, You can modify the next.config.js file, add
const nextConfig = { ... , transpilePackages: ["@ant-design/icons"], }
@kkk360 Thanks. It works :) Is that in the official document?
Fixed in @ant-design/[email protected]
: https://github.com/ant-design/ant-design-icons/pull/653