M
M
MeMoJlor2021-11-09 21:58:24
GitLab
MeMoJlor, 2021-11-09 21:58:24

Why doesn't SPA start on GitLab?

Good evening, here is the link to the repo. Created a .gitlab-ci.yml file, with the following settings:

pages: # задание должно быть именованными страницами
  image: node:latest
  stage: deploy
  script:
    - npm ci
    - npm run build
    - mv public public-vue # GitLab Pages хук для каталога public
    - mv dist public # переименование каталога dist (результат команды npm run build)
    # опционально, можно активировать поддержку gzip с помощью следующей строки:
    - find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -exec gzip -f -k {} \;
  artifacts:
    paths:
      - public # путь к артефакту должен быть /public для GitLab Pages
  only:
    - master


But when starting pipelines, it gives an error:
MISTAKE

$ npm run build
> [email protected]0.1.0 build
> vue-cli-service build
 ERROR  Error loading /builds/stotizd/vue-todo/vue.config.js:
 ERROR  TypeError: Cannot read properties of undefined (reading 'gitlab')
TypeError: Cannot read properties of undefined (reading 'gitlab')
    at Object.<anonymous> (/builds/stotizd/vue-todo/vue.config.js:3:33)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1147:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at exports.loadModule (/builds/stotizd/vue-todo/node_modules/@vue/cli-shared-utils/lib/module.js:79:14)
    at Service.loadUserOptions (/builds/stotizd/vue-todo/node_modules/@vue/cli-service/lib/Service.js:330:22)
    at Service.init (/builds/stotizd/vue-todo/node_modules/@vue/cli-service/lib/Service.js:70:30)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Karabanov, 2021-11-10
@karabanov

nodejs is fresh and the code is not ready for it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question