Почему Netlify не развертывает приложение React через npm start или npm build - PullRequest
0 голосов
/ 27 февраля 2020

Я попытался развернуть приложение React с веб-пакетом на Netlify через Github и CLI и все еще получил пустую страницу.

Можно ли изменить команду сборки для работы с веб-пакетом через npm start? Кроме того, какие переменные необходимо ввести в «Команду сборки» для раздела непрерывной разработки Netlify?

Я создаю приложение реакции, используя webpack и mapbox для локальной визуализации внешнего интерфейса.

9:30:50 AM: Build ready to start
9:30:53 AM: build-image version: 9cade8af58c2cf3a17a1e9433d2e979149488837
9:30:53 AM: build-image tag: v3.3.5
9:30:53 AM: buildbot version: 2fd8f04962d5dbc77b79b9c2f5ab7a077e87376b
9:30:53 AM: Fetching cached dependencies
9:30:53 AM: Failed to fetch cache, continuing with build
9:30:53 AM: Starting to prepare the repo for build
9:30:54 AM: No cached dependencies found. Cloning fresh repo
9:30:54 AM: git clone https://github.com/Spottybadrabbit/
9:31:05 AM: Preparing Git Reference refs/heads/master
9:31:06 AM: Found Netlify configuration file netlify.toml in site root
9:31:06 AM: Found Netlify configuration file(s). Overriding site configuration
9:31:06 AM: Found Netlify configuration file in base directory: /. Overriding existing configuration
9:31:06 AM: Different build command detected, going to use the one specified in the Netlify configuration file: 'REACT_APP_STAGE=prod npm run build' versus 'REACT_APP_STAGE=dev npm run build' in the Netlify UI
9:31:06 AM: Different base path detected, going to use the one specified in the Netlify configuration file: '/' versus '' in the Netlify UI
9:31:06 AM: Starting build script
9:31:06 AM: Installing dependencies
9:31:08 AM: Downloading and installing node v10.19.0...
9:31:08 AM: Downloading https://nodejs.org/dist/v10.19.0/node-v10.19.0-linux-x64.tar.xz...
9:31:08 AM: 
#####################
9:31:08 AM:                                                  29.9%
9:31:08 AM: 
########################################################################
9:31:08 AM: 100.0%
9:31:08 AM: Computing checksum with sha256sum
9:31:09 AM: Checksums matched!
9:31:13 AM: Now using node v10.19.0 (npm v6.13.4)
9:31:13 AM: Attempting ruby version 2.6.2, read from environment
9:31:15 AM: Using ruby version 2.6.2
9:31:15 AM: Using PHP version 5.6
9:31:15 AM: Started restoring cached node modules
9:31:17 AM: Finished restoring cached node modules
9:31:17 AM: Started restoring cached yarn cache
9:31:17 AM: Finished restoring cached yarn cache
9:31:17 AM: Installing yarn at version 1.17.0
9:31:17 AM: Installing Yarn!
9:31:17 AM: > Downloading tarball...
9:31:17 AM: [1/2]: https://yarnpkg.com/downloads/1.17.0/yarn-v1.17.0.tar.gz --> /tmp/yarn.tar.gz.3Sn8zHZAfT
9:31:17 AM:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
9:31:17 AM:                                  Dload  Upload   Total   Spent
9:31:17 AM:     Left  Speed
9:31:17 AM: 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
9:31:18 AM: 
100    80  100    80    0     0    207
9:31:18 AM:    0 --:--:-- --:--:-- --:--:--   207
9:31:18 AM: 
  0    93    0     0    0     0      0
9:31:18 AM:  0 --:--:-- --:--:-- --:--:--     0
100    93  100    9
9:31:18 AM: 3    0
9:31:18 AM:  0    125      0 --:--:-- --:--:-- --:
9:31:18 AM: --:-- 93000
9:31:18 AM: 
100   609  100   609    0     0    56
9:31:18 AM: 6      0  0:00:01  0:00:01 --:--:--   566
9:31:19 AM: 
100 1213k  100 1213k    0     0   725k      0  0:00:01  0:0
9:31:19 AM: 0:01 --:--:--  725k
9:31:19 AM: [2/2]: https://yarnpkg.com/download
9:31:19 AM: s/1.17.0/yarn-v1.17.0.tar.gz.asc --> /tmp/yarn.tar.gz.3Sn8zH
9:31:19 AM: ZAfT.asc
9:31:19 AM: 
100    84  100    84    0     0   2758      0 --:--:-- --:--:-- -
9:31:19 AM: -:--:--  2758
9:31:19 AM: 
  0    97    0     0    0
9:31:19 AM:   0      0      0 --:--:-- --:--:-- --:--:--     0
9:31:19 AM: 
100    97  100    97    0
9:31:19 AM: 0   1605      0 --:--:-- --:--:-- --:--:-- 97000
9:31:19 AM: 
100   613  100   613    0     0   3217      0 --:--:-- --:--:-- --:--:--  3217
9:31:19 AM: 
100   832  100   832    0     0   3639      0 --:--:--
9:31:19 AM:  --:--:-- --:--:--  3639
9:31:19 AM: > Verifying integrity...
9:31:19 AM: gpg: Signature made Fri 14 Jun 2019 06:55:58 PM UTC using RSA key ID 69475BAA
9:31:19 AM: gpg: Good signature from "Yarn Packaging <yarn@dan.cx>"
9:31:19 AM: gpg: Note: This key has expired!
9:31:19 AM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907
9:31:19 AM:   BBB7 1646 B01B 86E5 0310
9:31:19 AM:      Subkey fingerprint: 6D98 490C 6F1A CDDD 448E  4595 4F77 6793 6947 5BAA
9:31:19 AM: > GPG signature looks good
9:31:19 AM: > Extracting to ~/.yarn...
9:31:19 AM: > Adding to $PATH...
9:31:20 AM: > Successfully installed Yarn 1.17.0! Please open another terminal where the `yarn` command will now be available.
9:31:21 AM: Installing NPM modules using Yarn version 1.17.0
9:31:21 AM: yarn install v1.17.0
9:31:21 AM: warning package.json: No license field
9:31:21 AM: warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
9:31:21 AM: warning No license field
9:31:21 AM: [1/4] Resolving packages...
9:31:23 AM: [2/4] Fetching packages...
9:31:51 AM: info fsevents@2.1.2: The platform "linux" is incompatible with this module.
9:31:51 AM: info "fsevents@2.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
9:31:51 AM: info fsevents@1.2.11: The platform "linux" is incompatible with this module.
9:31:51 AM: info "fsevents@1.2.11" is an optional dependency and failed compatibility check. Excluding it from installation.
9:31:51 AM: [3/4] Linking dependencies...
9:31:51 AM: warning " > react-palm@3.1.2" has unmet peer dependency "enzyme@^3.6.0".
9:31:51 AM: warning " > react-palm@3.1.2" has unmet peer dependency "enzyme-adapter-utils@^1.8.0".
9:31:51 AM: warning " > react-palm@3.1.2" has unmet peer dependency "react-test-renderer@^16.4.1".
9:31:51 AM: warning " > react-redux@7.1.3" has unmet peer dependency "redux@^2.0.0 || ^3.0.0 || ^4.0.0-0".
9:31:51 AM: warning "kepler.gl > react-tooltip@3.11.6" has incorrect peer dependency "react@>=^16.0.0".
9:31:51 AM: warning "kepler.gl > react-tooltip@3.11.6" has incorrect peer dependency "react-dom@>=^16.0.0".
9:32:03 AM: [4/4] Building fresh packages...
9:32:06 AM: success Saved lockfile.
9:32:06 AM: Done in 44.43s.
9:32:06 AM: NPM modules installed using Yarn
9:32:06 AM: warning package.json: No license field
9:32:06 AM: Started restoring cached go cache
9:32:06 AM: Finished restoring cached go cache
9:32:06 AM: unset GOOS;
9:32:06 AM: unset GOARCH;
9:32:06 AM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
9:32:06 AM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
9:32:06 AM: go version >&2;
9:32:06 AM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
9:32:06 AM: go version go1.12 linux/amd64
9:32:06 AM: Installing missing commands
9:32:06 AM: Verify run directory
9:32:06 AM: Executing user command: REACT_APP_STAGE=prod npm run build
9:32:07 AM: npm
9:32:07 AM: ERR!
9:32:07 AM:  missing script: build
9:32:07 AM: npm ERR! A complete log of this run can be found in:
9:32:07 AM: npm
9:32:07 AM:  ERR!     /opt/buildhome/.npm/_logs/2020-02-13T09_32_07_160Z-debug.log
9:32:07 AM: Skipping functions preparation step: no functions directory set
9:32:07 AM: Caching artifacts
9:32:07 AM: Started saving node modules
9:32:07 AM: Finished saving node modules
9:32:07 AM: Started saving yarn cache
9:32:07 AM: Finished saving yarn cache
9:32:07 AM: Started saving pip cache
9:32:07 AM: Finished saving pip cache
9:32:07 AM: Started saving emacs cask dependencies
9:32:07 AM: Finished saving emacs cask dependencies
9:32:07 AM: Started saving maven dependencies
9:32:07 AM: Finished saving maven dependencies
9:32:07 AM: Started saving boot dependencies
9:32:07 AM: Finished saving boot dependencies
9:32:07 AM: Started saving go dependencies
9:32:07 AM: Finished saving go dependencies
9:32:10 AM: Error running command: Build script returned non-zero exit code: 1
9:32:10 AM: Failing build: Failed to build site
9:32:10 AM: failed during stage 'building site': Build script returned non-zero exit code: 1
9:32:10 AM: Finished processing build request in 1m17.4339943s
...