部署nextjs网站进行网络崩溃保持崩溃

问题描述 投票:-1回答:1

[我正在尝试部署我的nextjs应用程序netlify,但是它一直向我抛出失败错误,并且没有部署,这是我的github存储库https://github.com/naveenkash/Forex,这是我尝试修复swapicon的日志,但是在区分大小写错误之前,它仍然会抛出错误,但是它仍然给我错误,现在我修复了它

我的部署日志

8:13:48 PM: Build ready to start
8:13:51 PM: build-image version: 9e0f207a27642d0115b1ca97cd5e8cebbe492f63
8:13:51 PM: build-image tag: v3.3.2
8:13:51 PM: buildbot version: 8727aab446158e7b8c8ad2e96fe74b0154505a4e
8:13:51 PM: Fetching cached dependencies
8:13:52 PM: Starting to download cache of 96.3MB
8:13:52 PM: Finished downloading cache in 925.950503ms
8:13:52 PM: Starting to extract cache
8:13:56 PM: Finished extracting cache in 3.93263713s
8:13:56 PM: Finished fetching cache in 4.897793706s
8:13:56 PM: Starting to prepare the repo for build
8:13:57 PM: Preparing Git Reference refs/heads/master
8:13:57 PM: Starting build script
8:13:57 PM: Installing dependencies
8:13:58 PM: Started restoring cached node version
8:14:00 PM: Finished restoring cached node version
8:14:01 PM: v10.16.3 is already installed.
8:14:02 PM: Now using node v10.16.3 (npm v6.9.0)
8:14:03 PM: Attempting ruby version 2.6.2, read from environment
8:14:05 PM: Using ruby version 2.6.2
8:14:05 PM: Using PHP version 5.6
8:14:05 PM: Started restoring cached node modules
8:14:05 PM: Finished restoring cached node modules
8:14:05 PM: Started restoring cached go cache
8:14:05 PM: Finished restoring cached go cache
8:14:06 PM: unset GOOS;
8:14:06 PM: unset GOARCH;
8:14:06 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
8:14:06 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
8:14:06 PM: go version >&2;
8:14:06 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
8:14:06 PM: go version go1.12 linux/amd64
8:14:06 PM: Installing missing commands
8:14:06 PM: Verify run directory
8:14:06 PM: Executing user command: npm run deploy
8:14:06 PM: > [email protected] deploy /opt/build/repo
8:14:06 PM: > next build && next export
8:14:08 PM: Attention: Next.js now collects completely anonymous telemetry regarding usage.
8:14:08 PM: This information is used to shape Next.js' roadmap and prioritize features.
8:14:08 PM: You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
8:14:08 PM: https://nextjs.org/telemetry
8:14:08 PM: Creating an optimized production build...
8:14:31 PM: Failed to compile.
8:14:31 PM: ./components/currencyInput.js
8:14:31 PM: Module not found: Can't resolve './swapicon' in '/opt/build/repo/components'
8:14:31 PM: > Build error occurred
8:14:31 PM: Error: > Build failed because of webpack errors
8:14:31 PM:     at build (/opt/build/repo/node_modules/next/dist/build/index.js:7:847)
8:14:31 PM: npm ERR! code ELIFECYCLE
8:14:31 PM: npm ERR! errno 1
8:14:31 PM: npm ERR! [email protected] deploy: `next build && next export`
8:14:31 PM: npm ERR! Exit status 1
8:14:31 PM: npm ERR!
8:14:31 PM: npm ERR! Failed at the [email protected] deploy script.
8:14:31 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
8:14:31 PM: npm
8:14:31 PM:  ERR! A complete log of this run can be found in:
8:14:31 PM: npm ERR!
8:14:31 PM:      /opt/buildhome/.npm/_logs/2019-10-14T14_44_31_555Z-debug.log
8:14:31 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
8:14:31 PM: Skipping functions preparation step: no functions directory set
8:14:31 PM: Caching artifacts
8:14:31 PM: Started saving node modules
8:14:31 PM: Shutting down logging, 14 messages pending
8:14:31 PM: Finished saving node modules
javascript reactjs next.js netlify
1个回答
0
投票

您尚未解决此问题。

选项1

更改

import SwapIcon from "./swapicon";

import SwapIcon from "./swapIcon";

OR

选项2

更改文件名

git mv ./swapIcon ./swapicon

然后部署。

© www.soinside.com 2019 - 2024. All rights reserved.