question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Techdocs: Unable to generate docs on Gitlab hosts locally

See original GitHub issue

Expected Behavior

Gitlab projects cloned inside /tmp/backstage-xxxx

Current Behavior

Gitlab projects are currently being cloned inside a subfolder /tmp/backstage-xxxx/repository-name-xxxx When generating the doc, mkdocs can’t find the mkdocs.yml file because the mkdocs is not inside /tmp/backstage-xxxx but inside /tmp/backstage-xxxx/repository-name-xxxx

Steps to Reproduce

  1. Create a Gitlab repository with documentation inside it (I had the issue on Gitlab enterprise)
  2. Have a backstage project linked to it
  3. Run your backstage backend
  4. Run your backstage frontend
  5. Go to the documentation page
  6. The error should be displayed on the backend console

Context

On my dev env, I was trying to display the documentation of a project hosted on Gitlab I don’t have backstage running in a container, I directly used yarn start on my host machine from a clone of backstage. Techdocs is configured like this:

techdocs:
  requestUrl: http://localhost:7000/api/techdocs
  storageUrl: http://localhost:7000/api/techdocs/static/docs
  builder: 'local'
  generators:
    techdocs: 'docker'
  publisher:
    type: 'local' 

Here is a stack trace:

2021-02-11T14:30:04.980Z techdocs warn Could not read file /tmp/backstage-r2ayTr/mkdocs.yml before running the generator. ENOENT: no such file or directory, open '/tmp/backstage-r2ayTr/mkdocs.yml' type=plugin
2021-02-11T14:30:07.585Z backstage error Failed to generate docs from /tmp/backstage-r2ayTr into /tmp/techdocs-tmp-cBtwQo with error Docker container returned a non-zero exit code (1) type=errorHandler stack=Error: Failed to generate docs from /tmp/backstage-r2ayTr into /tmp/techdocs-tmp-cBtwQo with error Docker container returned a non-zero exit code (1)
    at TechdocsGenerator.run (webpack-internal:///../techdocs-common/src/stages/generate/techdocs.ts:120:13)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async DocsBuilder.build (webpack-internal:///../../plugins/techdocs-backend/src/DocsBuilder/builder.ts:94:5)
    at async eval (webpack-internal:///../../plugins/techdocs-backend/src/service/router.ts:143:13)

Your Environment

  • NodeJS Version (v14.15.4):
  • Ubuntu 20.04
  • backend-common (v0.4.3)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
yorickgirardcommented, Feb 11, 2021

@OrkoHunter after updating the dependencies it works properly, I think the issue can be closed

Thanks

0reactions
yorickgirardcommented, Feb 11, 2021

Here is the project

I’ll update my dependencies right now thanks

project-sample-backstage-master.zip

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gitlab Techdocs endpoints going bad · Issue #6700 - GitHub
As Im running on a local postgres instance - so to make sure nothing god "cached", I scratched the psql and recreated it....
Read more >
TechDocs How-To guides - Backstage.io
builder from 'local' to 'external' . By doing this, TechDocs will not try to generate docs. Look at TechDocs configuration for reference. How...
Read more >
Backstage TechDocs - How it works - Roadie.io
TechDocs is the core Backstage feature which transforms markdown ... code of the component to the local filesystem to generate the docs.
Read more >
Wiki - GitLab Docs
Create or edit wiki pages locally. Wikis are based on Git repositories, so you can clone them locally and edit them like you...
Read more >
Usage - OpenAPI Generator
Options for OpenAPI Generator are the same whether you're using the CLI, Maven/Gradle Plugins, or Online generation options.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found