[英]Why is there an error during build next.js project?
**我的 node.js.yml 文件 **
name: Node.js CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build
- run: npm run export
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: out # The folder the action should deploy.
在此处输入图片描述错误
链接到我的存储库https://github.com/EduardKop/web-cv-next
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
distDir: 'build',
images: {
loader: 'akamai',
path: '',
}
}
module.exports = nextConfig
我写了 next.config.js 配置。 我做了一个提交,然后在 yaml 文件中设置了上面指示的操作并得到了一个错误
你应该给出图像的路径,错误的说路径不能小于 0 个字符。
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
distDir: 'build',
images: {
loader: 'akamai',
path: '',
}
}
module.exports = nextConfig
您应该在路径属性中写入路径。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.