Время развертывания Netlify истекло - PullRequest
0 голосов
/ 26 января 2020

Я пытаюсь развернуть простую целевую страницу в Netlify, но меня смущает процесс развертывания. Сайт, который я пытаюсь развернуть, имеет такую ​​же структуру файлов, как этот: https://github.com/adamlaz/temp-Ava#getting -старт . У него есть папка src с файлами javascript и css и файл index.html в root проекта. Если я запускаю команду сборки локально, она создает папку dist с файлами развертывания. Папки node_modules и dist не отслеживаются git. Содержимое файла package.json в значительной степени совпадает с тем же файлом в репозитории, с которым я связан (https://github.com/adamlaz/temp-Ava/blob/master/package-sample.json).

При развертывании сайта в Netlify я устанавливаю base directory как ., команда построения как npm run build и каталог publi sh как ./dist. У меня есть сайт, связанный с моим репозиторием git, и всякий раз, когда я делаю sh, начинается новая фиксация на нем. После 10 минут работы появляется сообщение об ошибке Build exceeded maximum allowed runtime. Полный журнал ошибок можно увидеть ниже. Есть также другая ошибка, говорящая, что Error: Cannot find module 'brace-expansion'.

Что я здесь не так делаю? Мое лучшее предположение, что я неправильно обозначаю каталог root. Другое предположение состоит в том, что сервер Netlify не имеет доступа к модулям узла и, следовательно, не работает npm install в какой-либо части процесса?

Вот журнал ошибок:

10:57:05 AM: Build ready to start
10:57:08 AM: build-image version: 9cade8af58c2cf3a17a1e9433d2e979149488837
10:57:08 AM: build-image tag: v3.3.5
10:57:08 AM: buildbot version: 036f37945d6de439a17a554b3ae02e2f8f0f1fb0
10:57:08 AM: Fetching cached dependencies
10:57:08 AM: Failed to fetch cache, continuing with build
10:57:08 AM: Starting to prepare the repo for build
10:57:09 AM: No cached dependencies found. Cloning fresh repo
10:57:09 AM: git clone https://github.com/my-profile/my-landing-page
10:57:09 AM: Preparing Git Reference refs/heads/master
10:57:10 AM: Starting build script
10:57:10 AM: Installing dependencies
10:57:11 AM: Downloading and installing node v10.18.1...
10:57:11 AM: Downloading https://nodejs.org/dist/v10.18.1/node-v10.18.1-linux-x64.tar.xz...
10:57:12 AM: 
########################################
10:57:12 AM:                    56.9%
10:57:12 AM: 
########################################################
10:57:12 AM: ################ 100.0%
10:57:12 AM: Computing checksum with sha256sum
10:57:12 AM: Checksums matched!
10:57:14 AM: Now using node v10.18.1 (npm v6.13.4)
10:57:15 AM: Attempting ruby version 2.6.2, read from environment
10:57:16 AM: Using ruby version 2.6.2
10:57:16 AM: Using PHP version 5.6
10:57:16 AM: Started restoring cached node modules
10:57:16 AM: Finished restoring cached node modules
10:57:16 AM: Installing NPM modules using NPM version 6.13.4
10:57:24 AM: npm
10:57:24 AM:  WARN deprecated @types/vfile-message@2.0.0: This is a stub types definition. vfile-message provides its own type definitions, so you do not need this installed.
10:57:25 AM: npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
10:57:41 AM: > node-sass@4.13.1 install /opt/build/repo/node_modules/node-sass
10:57:41 AM: > node scripts/install.js
10:57:41 AM: Downloading binary from https://github.com/sass/node-sass/releases/download/v4.13.1/linux-x64-64_binding.node
10:57:42 AM: Download complete
10:57:42 AM: Binary saved to /opt/build/repo/node_modules/node-sass/vendor/linux-x64-64/binding.node
10:57:42 AM: Caching binary to /opt/buildhome/.npm/node-sass/4.13.1/linux-x64-64_binding.node
10:57:42 AM: > gifsicle@3.0.4 postinstall /opt/build/repo/node_modules/gifsicle
10:57:42 AM: > node lib/install.js
10:57:43 AM:   ✔ gifsicle pre-build test passed successfully
10:57:43 AM: > jpegtran-bin@3.2.0 postinstall /opt/build/repo/node_modules/jpegtran-bin
10:57:43 AM: > node lib/install.js
10:57:44 AM:   ✔ jpegtran pre-build test passed successfully
10:57:44 AM: > optipng-bin@3.1.4 postinstall /opt/build/repo/node_modules/optipng-bin
10:57:44 AM: > node lib/install.js
10:57:44 AM:   ✔ optipng pre-build test passed successfully
10:57:44 AM: > node-sass@4.13.1 postinstall /opt/build/repo/node_modules/node-sass
10:57:44 AM: > node scripts/build.js
10:57:44 AM: Binary found at /opt/build/repo/node_modules/node-sass/vendor/linux-x64-64/binding.node
10:57:44 AM: Testing binary
10:57:44 AM: Binary is fine
10:57:45 AM: > ellie@1.0.0 postinstall /opt/build/repo
10:57:45 AM: > run-s build watch
10:57:45 AM: > ellie@1.0.0 build /opt/build/repo
10:57:45 AM: > run-s build:*
10:57:46 AM: > ellie@1.0.0 build:css /opt/build/repo
10:57:46 AM: > run-s lint-scss scss autoprefixer
10:57:46 AM: > ellie@1.0.0 lint-scss /opt/build/repo
10:57:46 AM: > stylelint src/scss/*.scss --syntax scss || true
10:57:47 AM: > ellie@1.0.0 scss /opt/build/repo
10:57:47 AM: > node-sass --output-style compressed -o dist/css src/scss
10:57:47 AM: Rendering Complete, saving .css file...
10:57:47 AM: Wrote CSS to /opt/build/repo/dist/css/style.css
10:57:47 AM: Wrote 1 CSS files to /opt/build/repo/dist/css
10:57:48 AM: > ellie@1.0.0 autoprefixer /opt/build/repo
10:57:48 AM: > postcss -u autoprefixer -r dist/css/*
10:57:49 AM: > ellie@1.0.0 build:js /opt/build/repo
10:57:49 AM: > run-s lint uglify
10:57:49 AM: > ellie@1.0.0 lint /opt/build/repo
10:57:49 AM: > eslint src/js || true
10:57:51 AM: > ellie@1.0.0 uglify /opt/build/repo
10:57:51 AM: > mkdirp dist/js -p && uglifyjs src/js/*.js -m -c -o dist/js/main.min.js
10:57:52 AM: > ellie@1.0.0 build:images /opt/build/repo
10:57:52 AM: > run-s imagemin
10:57:52 AM: > ellie@1.0.0 imagemin /opt/build/repo
10:57:52 AM: > imagemin src/images/* -o dist/images
10:57:52 AM: 0 images minified
10:57:53 AM: > ellie@1.0.0 watch /opt/build/repo
10:57:53 AM: > run-p serve watch:*
10:57:54 AM: > ellie@1.0.0 watch:css /opt/build/repo
10:57:54 AM: > onchange "src/scss" -- run-s build:css
10:57:54 AM: > ellie@1.0.0 serve /opt/build/repo
10:57:54 AM: > browser-sync start --server --files "dist/css/*.css, dist/js/*.js, **/*.html, !node_modules/**/*.html"
10:57:54 AM: > ellie@1.0.0 watch:images /opt/build/repo
10:57:54 AM: > onchange "src/images" -- run-s build:images
10:57:54 AM: > ellie@1.0.0 watch:js /opt/build/repo
10:57:54 AM: > onchange "src/js" -- run-s build:js
10:57:55 AM: [Browsersync] Access URLs:
10:57:55 AM:  -------------------------------------
10:57:55 AM:        Local: http://localhost:3000
10:57:55 AM:     External: http://x.x.x.x:3000
10:57:55 AM:  -------------------------------------
10:57:55 AM:           UI: http://localhost:3001
10:57:55 AM:  UI External: http://localhost:3001
10:57:55 AM:  -------------------------------------
10:57:55 AM: [Browsersync] Serving files from: ./
10:57:55 AM: [Browsersync] Watching files...
10:57:55 AM: [Browsersync] Couldn't open browser (if you are using BrowserSync in a headless environment, you might want to set the open option to false)
11:27:05 AM: Build exceeded maximum allowed runtime
11:27:06 AM: internal/modules/cjs/loader.js:638
11:27:06 AM:     throw err;
11:27:06 AM:     ^
11:27:06 AM: Error: Cannot find module 'brace-expansion'
11:27:06 AM:     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
11:27:06 AM:     at Function.Module._load (internal/modules/cjs/loader.js:562:25)
11:27:06 AM:     at Module.require (internal/modules/cjs/loader.js:692:17)
11:27:06 AM:     at require (internal/modules/cjs/helpers.js:25:18)
11:27:06 AM:     at Object.<anonymous> (/opt/build/repo/node_modules/minimatch/minimatch.js:10:14)
11:27:06 AM:     at Module._compile (internal/modules/cjs/loader.js:778:30)
11:27:06 AM:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
11:27:06 AM:     at Module.load (internal/modules/cjs/loader.js:653:32)
11:27:06 AM:     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
11:27:06 AM:     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
11:27:06 AM: internal/modules/cjs/loader.js:638
11:27:06 AM:     throw err;
11:27:06 AM:     ^
11:27:06 AM: Error: Cannot find module 'brace-expansion'
11:27:06 AM:     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
11:27:06 AM:     at Function.Module._load (internal/modules/cjs/loader.js:562:25)
11:27:06 AM:     at Module.require (internal/modules/cjs/loader.js:692:17)
11:27:06 AM:     at require (internal/modules/cjs/helpers.js:25:18)
11:27:06 AM:     at Object.<anonymous> (/opt/build/repo/node_modules/minimatch/minimatch.js:10:14)
11:27:06 AM:     at Module._compile (internal/modules/cjs/loader.js:778:30)
11:27:06 AM:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
11:27:06 AM:     at Module.load (internal/modules/cjs/loader.js:653:32)
11:27:06 AM:     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
11:27:06 AM:     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
...