-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
🐛 fix plugins.md formatting for docs with dockerized docs validation #1722
🐛 fix plugins.md formatting for docs with dockerized docs validation #1722
Conversation
Since the docs dependend on the files from packages, we have to include the Dockerfile.docs in the root directory because of the build context. Adding a new docker-compose-docs.yaml to always build the docs from the file directly. Just adding a new service for the docs: $ docker compose up --build [+] Building 55.5s (20/20) FINISHED docker:desktop-linux => [docs internal] load build definition from Dockerfile.docs 0.0s => => transferring dockerfile: 1.88kB 0.0s => [docs] resolve image config for docker.io/docker/dockerfile:1 1.7s => CACHED [docs] docker-image://docker.io/docker/dockerfile:1@sha256:93bfd3b68c109427185cd78b4779fc82b484b0b7618e36d0f104d4d801e66d25 0.0s => [docs internal] load build definition from Dockerfile.docs 0.0s => [docs internal] load metadata for docker.io/library/node:23.3.0-slim 1.3s => [docs internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [docs base 1/4] FROM docker.io/library/node:23.3.0-slim@sha256:8b30809f66a6ea8896b9a5d004b4fe2cc0e8061d981d3784fb0e80a19b86ab9d 0.0s => [docs internal] load build context 0.1s => => transferring context: 409.46kB 0.1s => CACHED [docs base 2/4] RUN corepack enable 0.0s => CACHED [docs base 3/4] WORKDIR /opt/docusaurus 0.0s => CACHED [docs base 4/4] RUN apt-get update && apt-get install -y git 0.0s => CACHED [docs prod 1/8] WORKDIR /opt/docusaurus 0.0s => CACHED [docs prod 2/8] COPY docs/package.json /opt/docusaurus/package.json 0.0s => CACHED [docs prod 3/8] COPY docs/package-lock.json /opt/docusaurus/package-lock.json 0.0s => CACHED [docs prod 4/8] RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install 0.0s => CACHED [docs prod 5/8] COPY docs/ /opt/docusaurus/ 0.0s => CACHED [docs prod 6/8] COPY packages/ /opt/packages/ 0.0s => [docs prod 7/8] COPY .git/ /opt/.git/ 0.1s => [docs prod 8/8] RUN pnpm run build 51.4s => [docs] exporting to image 0.8s => => exporting layers 0.8s => => writing image sha256:0a580f2889191121880df85b8951563386f838f7e5f8723dec750ce292334498 0.0s => => naming to docker.io/library/eliza-docs 0.0s [+] Running 1/0 ✔ Container eliza-docs-1 Recreated 0.0s Attaching to docs-1 docs-1 | (node:1) ExperimentalWarning: CommonJS module /usr/local/lib/node_modules/npm/node_modules/debug/src/node.js is loading ES Module /usr/local/lib/node_modules/npm/node_modules/supports-color/index.js using require(). docs-1 | Support for loading ES Module in require() is an experimental feature and might change at any time docs-1 | (Use `node --trace-warnings ...` to show where the warning was created) docs-1 | docs-1 | > eliza-docs@0.1.7-alpha.2 serve docs-1 | > docusaurus serve --host 0.0.0.0 --no-open docs-1 | docs-1 | [SUCCESS] Serving "build" directory at: http://0.0.0.0:3000/eliza/
While trying to build within a docker image, here are the missing packages. 40.12 40.12 -------------------------- 40.12 40.12 Module not found: Error: Can't resolve 'lunr' in '/opt/docusaurus/.docusaurus' 40.12 40.12 -------------------------- 40.12 40.12 Module not found: Error: Can't resolve '@docusaurus/theme-common' in '/opt/docusaurus/community/components' 40.18 ELIFECYCLE Command failed with exit code 1. ------ failed to solve: process "/bin/sh -c pnpm run build" did not complete successfully: exit code: 1
> [prod 3/4] RUN pnpm ci: 0.645 /usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:22090 0.645 throw new UsageError(`No version specified for ${raw2} in "packageManager" of ${source}`); 0.645 ^ 0.645 0.645 UsageError: No version specified for pnpm in "packageManager" of package.json 0.645 at parseSpec (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:22090:13) 0.645 at loadSpec (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:22164:11) 0.645 at async Engine.findProjectSpec (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:22354:22) 0.645 at async Engine.executePackageManagerRequest (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:22410:24) 0.645 at async Object.runMain (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:23102:5) { 0.645 clipanion: { type: 'usage' } 0.645 }
Can't build the docs because of the following: docs/docs/packages/plugins.md 39.56 [webpackbar] ✔ Client: Compiled with some errors in 37.40s 39.56 [ERROR] Client bundle compiled with errors therefore further build is impossible. 39.56 Error: MDX compilation failed for file "/opt/docusaurus/docs/packages/plugins.md" 39.56 Cause: Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc 39.56 Details: 39.56 { 39.56 "column": 1, 39.56 "message": "Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc", 39.56 "line": 617, 39.56 "name": "617:1", 39.56 "place": { 39.56 "_bufferIndex": 0, 39.56 "_index": 10, 39.56 "line": 617, 39.56 "column": 1, 39.56 "offset": 21207 39.56 }, 39.56 "reason": "Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc", 39.56 "ruleId": "unexpected-lazy", 39.56 "source": "micromark-extension-mdx-expression", 39.56 "url": "https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed" 39.56 } 39.56 39.56 --------------------------
5ba2902
to
bf4d5d0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah that plugins.md typo tripped me up too, I was able to detect it on my system and fix. I think these changes would be good for CI, especially as we get into more agentic documentation practices.
Thank you @madjin... I'm glad it worked and you also found it!!! I can add a github actions to perform CI/CD with a dockerized version of it! That way we can lint the docs before publishing the latest... I will take a look at the current github actions from the repo and extend it... thank you! |
@madjin I see the merged PR is shown a broken check...
"engines": {
"node": ">=23.3.0 <24"
}
|
…ed-docs-support 🐛 fix plugins.md formatting for docs with dockerized docs validation
Can't build the docs because of the following:
docs/docs/packages/plugins.md
So, I'm adding the following features:
docs
Relates to:
Risks
Background
What does this PR do?
What kind of change is this?
Why are we doing this? Any context or related work?
Or else we can't build the docs locally
Documentation changes needed?
docs/README.md
file.Testing
Screenshots
Before
After
Database changes
Deployment instructions
$ docker compose -f docker-compose-docs.yaml up --build
Discord username
@x.crypt0.surf3r