#html #github #deployment #netlify #parcel
Вопрос:
Я новичок в программном обеспечении и в настоящее время учусь по ходу дела, поэтому прошу прощения, если я что-то плохо объясняю или использую неправильную терминологию, но: Я пытаюсь развернуть веб-сайт с помощью netlify, но я сталкиваюсь с ошибкой, которая заставляет меня чесать голову. Я использовал посылку, чтобы открыть живой сервер для веб-сайта, и все отлично работает. Мне пришлось добавить команду —no-minify в «сборку$ parcel index.html —no-minify» для правильной сборки. Я передал все свои git-коммиты на github. Я связал свой github с netlify и сейчас пытаюсь развернуть веб-сайт. я пробовал и то, и другое «сборка посылок index.html» и «сборка участка index.html —не уменьшать», но в обоих случаях я получаю это сообщение об ошибке:
1:03:51 PM: Build ready to start
1:03:53 PM: build-image version: 0582042f4fc261adc7bd8333f34884959c577302
1:03:53 PM: build-image tag: v3.7.6
1:03:53 PM: buildbot version: 96f6c6faf398b8f2b7e39c2c3c6a03ac4592e535
1:03:53 PM: Fetching cached dependencies
1:03:53 PM: Failed to fetch cache, continuing with build
1:03:53 PM: Starting to prepare the repo for build
1:03:54 PM: No cached dependencies found. Cloning fresh repo
1:03:54 PM: git clone https://github.com/Jason-Drexler/my-first-website
1:03:55 PM: Preparing Git Reference refs/heads/main
1:03:55 PM: Parsing package.json dependencies
1:03:56 PM: Starting build script
1:03:57 PM: Installing dependencies
1:03:57 PM: Python version set to 2.7
1:03:58 PM: v12.18.0 is already installed.
1:03:58 PM: Now using node v12.18.0 (npm v6.14.4)
1:03:59 PM: Started restoring cached build plugins
1:03:59 PM: Finished restoring cached build plugins
1:03:59 PM: Attempting ruby version 2.7.1, read from environment
1:04:00 PM: Using ruby version 2.7.1
1:04:00 PM: Using PHP version 5.6
1:04:01 PM: Started restoring cached node modules
1:04:01 PM: Finished restoring cached node modules
1:04:01 PM: Installing NPM modules using NPM version 6.14.4
1:04:15 PM: > deasync@0.1.21 install /opt/build/repo/node_modules/deasync
1:04:15 PM: > node ./build.js
1:04:15 PM: `linux-x64-node-12` exists; testing
1:04:15 PM: Binary is fine; exiting
1:04:16 PM: > core-js@2.6.12 postinstall /opt/build/repo/node_modules/core-js
1:04:16 PM: > node -e "try{require('./postinstall')}catch(e){}"
1:04:16 PM: > parcel-bundler@1.12.4 postinstall /opt/build/repo/node_modules/parcel-bundler
1:04:16 PM: > node -e "console.log('u001b[35mu001b[1mLove Parcel? You can now donate to our open collective:u001b[22mu001b[39mn > u001b[34mhttps://opencollective.com/parcel/donateu001b[0m')"
1:04:16 PM: Love Parcel? You can now donate to our open collective:
1:04:16 PM: > https://opencollective.com/parcel/donate
1:04:17 PM: npm WARN Moshified@1.0.0 No description
1:04:17 PM: npm WARN Moshified@1.0.0 No repository field.
1:04:17 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/fsevents):
1:04:17 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
1:04:17 PM: added 766 packages from 461 contributors and audited 768 packages in 15.056s
1:04:17 PM: 46 packages are looking for funding
1:04:17 PM: run `npm fund` for details
1:04:17 PM: found 68 vulnerabilities (67 moderate, 1 high)
1:04:17 PM: run `npm audit fix` to fix them, or `npm audit` for details
1:04:17 PM: NPM modules installed
1:04:17 PM: Started restoring cached go cache
1:04:18 PM: Finished restoring cached go cache
1:04:18 PM: go version go1.14.4 linux/amd64
1:04:18 PM: go version go1.14.4 linux/amd64
1:04:18 PM: Installing missing commands
1:04:18 PM: Verify run directory
1:04:20 PM:
1:04:20 PM: ────────────────────────────────────────────────────────────────
1:04:20 PM: Netlify Build
1:04:20 PM: ────────────────────────────────────────────────────────────────
1:04:20 PM:
1:04:20 PM: ❯ Version
1:04:20 PM: @netlify/build 11.18.0
1:04:20 PM:
1:04:20 PM: ❯ Flags
1:04:20 PM: deployId: 60a947873293e49f0df31a13
1:04:20 PM:
1:04:20 PM: ❯ Current directory
1:04:20 PM: /opt/build/repo
1:04:20 PM:
1:04:20 PM: ❯ Config file
1:04:20 PM: No config file was defined: using default values.
1:04:20 PM:
1:04:20 PM: ❯ Context
1:04:20 PM: production
1:04:20 PM:
1:04:20 PM: ────────────────────────────────────────────────────────────────
1:04:20 PM: 1. Build command from Netlify app
1:04:20 PM: ────────────────────────────────────────────────────────────────
1:04:20 PM:
1:04:20 PM: $ parcel build index.html --no-minify
1:04:22 PM: 🚨 /opt/build/repo/css/normalize.css:undefined:undefined: ENOENT: no such file or directory, open '/opt/build/repo/css/normalize.css'
1:04:22 PM: Error: ENOENT: no such file or directory, open '/opt/build/repo/css/normalize.css'
1:04:22 PM:
1:04:22 PM: ────────────────────────────────────────────────────────────────
1:04:22 PM: "build.command" failed
1:04:22 PM: ────────────────────────────────────────────────────────────────
1:04:22 PM:
1:04:22 PM: Error message
1:04:22 PM: Command failed with exit code 1: parcel build index.html --no-minify
1:04:22 PM:
1:04:22 PM: Error location
1:04:22 PM: In Build command from Netlify app:
1:04:22 PM: parcel build index.html --no-minify
1:04:22 PM:
1:04:22 PM: Resolved config
1:04:22 PM: build:
1:04:22 PM: command: parcel build index.html --no-minify
1:04:22 PM: commandOrigin: ui
1:04:22 PM: publish: /opt/build/repo/dist
1:04:23 PM: Caching artifacts
1:04:23 PM: Started saving node modules
1:04:23 PM: Finished saving node modules
1:04:23 PM: Started saving build plugins
1:04:23 PM: Finished saving build plugins
1:04:23 PM: Started saving pip cache
1:04:23 PM: Finished saving pip cache
1:04:23 PM: Started saving emacs cask dependencies
1:04:23 PM: Finished saving emacs cask dependencies
1:04:23 PM: Started saving maven dependencies
1:04:23 PM: Finished saving maven dependencies
1:04:23 PM: Started saving boot dependencies
1:04:23 PM: Finished saving boot dependencies
1:04:23 PM: Started saving rust rustup cache
1:04:23 PM: Finished saving rust rustup cache
1:04:23 PM: Started saving go dependencies
1:04:23 PM: Finished saving go dependencies
1:04:26 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
1:04:26 PM: Creating deploy upload records
1:04:26 PM: Failing build: Failed to build site
1:04:26 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2
1:04:26 PM: Finished processing build request in 32.922610763s
Похоже, он не распознает мою таблицу стилей normalize.css, хотя файл, по-видимому, находится в указанном netlify местоположении. Может ли кто-нибудь предложить здесь указатель?