развертывание приложения next.js на netlify, но оно продолжает давать сбой - PullRequest
0 голосов
/ 12 октября 2019

я пытаюсь развернуть мое следующее приложение на netlify, но он продолжает давать сбой idk, в чем проблема

вот мое репозиторий github для этого https://github.com/naveenkash/Forex

это мой package.json

{
  "name": "transfer-to",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "export": "next export",
    "deploy": "npm run build && npm run export",
    "start": "next start"
  },
  "dependencies": {
    "@zeit/next-css": "1.0.1",
    "chart.js": "^2.8.0",
    "isomorphic-unfetch": "^3.0.0",
    "next": "9.0.7",
    "react": "16.10.2",
    "react-chartjs-2": "^2.8.0",
    "react-dom": "16.10.2"
  }
}

и это моя команда развертывания

npm run build 

, и это моя папка развертывания

out

, но она выдаёт мне эту ошибку

2:43:29 PM: Failed to compile.
2:43:29 PM: ./components/currencyInput.js
2:43:29 PM: Module not found: Can't resolve './swapicon' in '/opt/build/repo/components'
2:43:29 PM: > Build error occurred
2:43:29 PM: Error: > Build failed because of webpack errors
2:43:29 PM:     at build (/opt/build/repo/node_modules/next/dist/build/index.js:7:847)
2:43:29 PM: npm
2:43:29 PM:  ERR! code ELIFECYCLE
2:43:29 PM: npm ERR! errno 1
2:43:29 PM: npm
2:43:29 PM:  ERR! transfer-to@0.1.0 build: `next build`
2:43:29 PM: npm
2:43:29 PM: ERR! Exit status 1
2:43:29 PM: npm
2:43:29 PM:  ERR!
2:43:29 PM: npm ERR! Failed at the transfer-to@0.1.0 build script.
2:43:29 PM: npm ERR!
2:43:29 PM:  This is probably not a problem with npm. There is likely additional logging output above.
2:43:29 PM: npm ERR! A complete log of this run can be found in:
2:43:29 PM: npm ERR!     /opt/buildhome/.npm/_logs/2019-10-12T09_13_29_327Z-debug.log
2:43:29 PM: Skipping functions preparation step: no functions directory set
2:43:29 PM: Caching artifacts
2:43:29 PM: Started saving node modules
2:43:29 PM: Finished saving node modules
2:43:29 PM: Started saving pip cache
2:43:29 PM: Finished saving pip cache
2:43:29 PM: Started saving emacs cask dependencies
2:43:29 PM: Finished saving emacs cask dependencies
2:43:29 PM: Started saving maven dependencies
2:43:29 PM: Finished saving maven dependencies
2:43:29 PM: Started saving boot dependencies
2:43:29 PM: Finished saving boot dependencies
2:43:29 PM: Started saving go dependencies
2:43:29 PM: Finished saving go dependencies
2:43:32 PM: Error running command: Build script returned non-zero exit code: 1
2:43:32 PM: Failing build: Failed to build site
2:43:32 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
2:43:32 PM: Finished processing build request in 52.219920693s
...