Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

it doesn't works in GitlabCI (no errors) #26

Closed
jalberto opened this issue Feb 17, 2021 · 2 comments · Fixed by #34
Closed

it doesn't works in GitlabCI (no errors) #26

jalberto opened this issue Feb 17, 2021 · 2 comments · Fixed by #34
Labels
bug Something isn't working

Comments

@jalberto
Copy link

Bug Report

Description

build doesn't work in CI

Steps to Reproduce

image

Expected Behavior

to build correctly or at least display errors

@jalberto jalberto added the bug Something isn't working label Feb 17, 2021
thomvaill added a commit that referenced this issue Apr 30, 2021
especially for `log4brains build` (see #26)
thomvaill added a commit that referenced this issue Apr 30, 2021
especially for `log4brains build` (see #26)
@thomvaill
Copy link
Owner

Hi @jalberto

Sorry for the late fix!

You just have to add --unsafe-perm to the npm install command on GitLab, because it is executed as root.
I updated the README accordingly. The example configuration is now:

image: node:14-alpine3.12
pages:
  stage: deploy
  variables:
    GIT_DEPTH: 0 # required by Log4brains to work correctly (needs the whole Git history)
  script:
    - mkdir -p public
    - npm install -g --unsafe-perm log4brains
    - log4brains build --basePath /$CI_PROJECT_NAME/log4brains --out public/log4brains
  artifacts:
    paths:
      - public
  rules:
    - if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH"

I also improved the error logging: all the Next.js errors were trapped for the log4brains build command (see #34)

Thank you!

@jalberto
Copy link
Author

jalberto commented Apr 30, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants