I have a repository generated via Gatsby
, still in plain vanilla (i.e., I have not edited any of the files generated with gatsby build
).
I want to push the generated content to my GitLab private project.
I have written the following .gitlab-ci.yml
, so that the pipeline gets executed after my push
:
build website:
image: node:16
script:
- npm install --loglevel verbose
- npm install -g gatsby-cli
- gatsby build
artifacts:
paths:
- ./public
On GitLab, the job gets executed, but it fails as the execution exceeds 1 hour.
I notice that certain tasks take quite a long of time, as per the console output. This is the first one to appear in my console output taking a considerable amount of time:
npm timing idealTree:init Completed in 813ms
Also, I get very similar warning messages, showing some dependency-resolution issues, with very high completion times. For instance:
...
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: babel-eslint@undefined
npm WARN node_modules/babel-eslint
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer babel-eslint@"^10.0.0" from [email protected]
npm WARN node_modules/eslint-config-react-app
npm WARN eslint-config-react-app@"^6.0.0" from [email protected]
npm WARN node_modules/gatsby
npm timing idealTree:node_modules/eslint-config-react-app Completed in 459232ms
...
I have tried to force the installation via npm install --force
, which did not alter the result.
I have also tried to ignore peerDependencies through npm install --legacy-peer-deps
, which also didn't work.
I wonder whether this is a dependency issue or somehow my GitLab runners are unable to install npm
at a faster pace.
CodePudding user response:
The problem ended up being a connectivity issue from the corporate network on which I was running GitLab. Once fixed, the pipeline runs the job successfully.