Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/375.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 将nextjs站点部署到netlify继续崩溃_Javascript_Reactjs_Next.js_Netlify - Fatal编程技术网

Javascript 将nextjs站点部署到netlify继续崩溃

Javascript 将nextjs站点部署到netlify继续崩溃,javascript,reactjs,next.js,netlify,Javascript,Reactjs,Next.js,Netlify,我正在尝试部署我的nextjs应用程序netlify,但它不断向我抛出失败的错误,没有部署这是我的github repo,这是我尝试修复swapicon的日志,但它仍然在大小写敏感错误之前抛出错误,但它仍然给我错误,现在我修复了它 我的部署日志 8:13:48 PM: Build ready to start 8:13:51 PM: build-image version: 9e0f207a27642d0115b1ca97cd5e8cebbe492f63 8:13:51 PM: build-im

我正在尝试部署我的nextjs应用程序netlify,但它不断向我抛出失败的错误,没有部署这是我的github repo,这是我尝试修复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: > transfer-to@0.1.0 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! transfer-to@0.1.0 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 transfer-to@0.1.0 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

你还没有解决这个问题

选项1

改变

import SwapIcon from "./swapicon";

选项2

更改文件名

git mv ./swapIcon ./swapicon
然后部署

git mv ./swapIcon ./swapicon