为什么我应该按照提供的链接中的说明定期这样做。
Info - Creating an optimized production build...
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
您可以访问以下URL了解更多信息,包括如果您不想参加此匿名计划,如何选择退出:
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Failed to compile.
./assets/openMDB.png 1:0
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)
> Build error occurred
Error: > Build failed because of webpack errors
at /vercel/path0/node_modules/next/dist/build/index.js:15:918
at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/telemetry/trace/trace.js:5:584)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Command "yarn run build" exited with 1
请任何人帮我解决这个问题,谢谢。
我也遇到过类似的问题。这些步骤对我很有效。
- 删除node_modules
- 运行
npm install
命令 - 运行
npm run build
命令(在这里你可以找到你的构建错误信息。如果出现错误,请尝试修复,然后再次部署( - 如果您对特定包有SSR问题,则可以使用动态导入
ssr:false
=>const dynamicImport = dynamic(() => import("package-name"), { ssr: false });