React/Next.js/Tailwind项目部署求助及Netlify构建超时问题
Tailwind Spotlight模板生产部署及Netlify构建超时问题求助
背景
我修改了Tailwind的Spotlight模板网站,原README仅包含本地运行说明,未提及生产环境部署步骤。尝试共享主机部署失败,目前使用Netlify部署时遇到问题:本地构建速度很快,但Netlify构建超时。
Netlify构建超时日志
12:09:35 PM: $ npm run dev 12:09:36 PM: > tailwindui-template@0.1.0 dev 12:09:36 PM: > next dev 12:09:36 PM: - info Loaded env from /opt/build/repo/spotlight-ts/.env.local 12:09:36 PM: - ready started server on [::]:3000, url: http://localhost:3000 12:09:37 PM: - info automatically enabled Fast Refresh for 1 custom loader 12:09:37 PM: - event compiled client and server successfully in 224 ms (20 modules) 12:09:38 PM: - wait compiling... 12:09:38 PM: - event compiled client and server successfully in 116 ms (20 modules) 12:09:38 PM: - info Loaded env from /opt/build/repo/spotlight-ts/.env.local 12:09:38 PM: - info Loaded env from /opt/build/repo/spotlight-ts/.env.local 12:27:43 PM: Execution timed out after 18m10.00140564s 12:27:43 PM: Error running command: Command did not finish within the time limit 12:27:43 PM: Failing build: Failed to build site 12:27:43 PM: Finished processing build request in 18m27.841s 12:27:43 PM: Failed during stage "building site": Command did not finish within the time limit
原模板README内容
Getting started
To get started with this template, first install the npm dependencies:
npm installNext, create a
.env.localfile in the root of your project and set theNEXT_PUBLIC_SITE_URLvariable to your site's public URL:NEXT_PUBLIC_SITE_URL=https://example.comNext, run the development server:
npm run devFinally, open http://localhost:3000 in your browser to view the website.
需求
- 该项目生产环境的分步部署指导
- 解决Netlify构建超时问题的方法
内容的提问来源于stack exchange,提问作者Justin
相关产品推荐
相关产品推荐

