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

Running make docs-prod failing locally #1070

Closed
kamilprz opened this issue Nov 26, 2024 · 2 comments
Closed

Running make docs-prod failing locally #1070

kamilprz opened this issue Nov 26, 2024 · 2 comments
Assignees
Labels
area/documentation Improvements or additions to documentation good first issue Good for newcomers scope/S Change is Small

Comments

@kamilprz
Copy link
Contributor

Describe the bug

Running make docs-prod fails when running locally.

kamilp@kamilp-devbox:~/src/retina$ make docs-prod
docker run -i -p 3000:3000 -v /home/kamilp/src/retina:/retina -w /retina/ node:20-alpine npm install --prefix site && npm run build --prefix site

up to date, audited 1339 packages in 2s

346 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
npm notice
npm notice New minor version of npm available! 10.8.2 -> 10.9.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.9.1
npm notice To update run: npm install -g [email protected]
npm notice

> [email protected] build
> docusaurus build


   ------------------------------------------------------------------------------------------------------------------------------------------------------

                                                               Update available 3.6.1 → 3.6.3

                                     To upgrade Docusaurus packages with the latest version, run the following command:
       `npm i @docusaurus/core@latest @docusaurus/plugin-ideal-image@latest @docusaurus/preset-classic@latest @docusaurus/module-type-aliases@latest
                                                   @docusaurus/tsconfig@latest @docusaurus/types@latest`

   ------------------------------------------------------------------------------------------------------------------------------------------------------

[INFO] [en] Creating an optimized production build...

[ERROR] Error: Unable to build website for locale en.
    at tryToBuildLocale (/home/kamilp/src/retina/site/node_modules/@docusaurus/core/lib/commands/build/build.js:78:15)
    at async /home/kamilp/src/retina/site/node_modules/@docusaurus/core/lib/commands/build/build.js:34:9
    at async mapAsyncSequential (/home/kamilp/src/retina/site/node_modules/@docusaurus/utils/lib/jsUtils.js:21:24)
    at async Command.build (/home/kamilp/src/retina/site/node_modules/@docusaurus/core/lib/commands/build/build.js:33:5) {
  [cause]: [Error: EACCES: permission denied, open '/home/kamilp/src/retina/site/.docusaurus/docusaurus-lunr-search/default/__plugin.json'] {
    errno: -13,
    code: 'EACCES',
    syscall: 'open',
    path: '/home/kamilp/src/retina/site/.docusaurus/docusaurus-lunr-search/default/__plugin.json'
  }
}
[INFO] Docusaurus version: 3.6.1
Node version: v21.7.3
make: *** [Makefile:566: docs-prod] Error 1

To Reproduce
Steps to reproduce the behavior:

  1. Go to root directory
  2. Run make docs-prod

Expected behavior

kamilp@kamilp-devbox:~/src/retina$ make docs-prod
docker run -i -p 3000:3000 -v /home/kamilp/src/retina:/retina -w /retina/ node:20-alpine sh ./site/start-dev.sh

up to date, audited 1339 packages in 3s

346 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
npm notice
npm notice New minor version of npm available! 10.8.2 -> 10.9.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.9.1
npm notice To update run: npm install -g [email protected]
npm notice

> [email protected] build
> docusaurus build

[INFO] [en] Creating an optimized production build...
[webpackbar] ℹ Compiling Client
[webpackbar] ℹ Compiling Server
[webpackbar] ✔ Server: Compiled successfully in 13.74s
[webpackbar] ✔ Client: Compiled successfully in 21.10s
docusaurus-lunr-search:: Building search docs and lunr index file
docusaurus-lunr-search:: Start scanning documents in 8 threads
docusaurus-lunr-search:: Indexing time: 1.034s
docusaurus-lunr-search:: indexed 34 documents out of 34
docusaurus-lunr-search:: writing search-doc.json
docusaurus-lunr-search:: writing search-doc-1732620484224.json
docusaurus-lunr-search:: writing lunr-index.json
docusaurus-lunr-search:: writing lunr-index-1732620484224.json
docusaurus-lunr-search:: End of process
[SUCCESS] Generated static files in "build".
[INFO] Use `npm run serve` command to test your build locally.

Platform (please complete the following information):

  • OS: WSL2
  • Kubernetes Version: 1.31.2
  • Host: localhost
  • Retina Version: v0.0.18

Additional context

Somehow we are still deploying docs to prod though - need to investigate how the pipeline works.

@kamilprz kamilprz added area/documentation Improvements or additions to documentation good first issue Good for newcomers scope/S Change is Small labels Nov 26, 2024
@kamilprz kamilprz self-assigned this Nov 26, 2024
@kamilprz
Copy link
Contributor Author

Also just noticed that there is a typo in the Makefile:

.PHONY: docs-pod

Should be docs-prod

@kamilprz
Copy link
Contributor Author

Unable to replicate this today. Successfully able to build and serve:

Building

~/src/retina git:docs-bug*
> make docs-prod
docker run -i -p 3000:3000 -v /home/kamilp/src/retina:/retina -w /retina/ node:20-alpine npm install --prefix site && npm run build --prefix site

up to date, audited 1339 packages in 4s

347 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
npm notice
npm notice New major version of npm available! 10.8.2 -> 11.0.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.0.0
npm notice To update run: npm install -g [email protected]
npm notice

> [email protected] build
> docusaurus build

[INFO] [en] Creating an optimized production build...





✔ Client
  Compiled successfully in 1.04m

✔ Server


<w> [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: EACCES: permission denied, mkdir '/home/kamilp/src/retina/site/node_modules/.cache'


● Client █████████████████████████ cache (99%) shutdown IdleFileCachePlugin
 stored

✔ Server


<w> [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: EACCES: permission denied, mkdir '/home/kamilp/src/retina/site/node_modules/.cache'
docusaurus-lunr-search:: Building search docs and lunr index file
docusaurus-lunr-search:: Start scanning documents in 2 threads
docusaurus-lunr-search:: Indexing time: 2.046s
docusaurus-lunr-search:: indexed 35 documents out of 35
docusaurus-lunr-search:: writing search-doc.json
docusaurus-lunr-search:: writing search-doc-1735662880052.json
docusaurus-lunr-search:: writing lunr-index.json
docusaurus-lunr-search:: writing lunr-index-1735662880052.json
docusaurus-lunr-search:: End of process
[SUCCESS] Generated static files in "build".
[INFO] Use `npm run serve` command to test your build locally.

Serving from /site

~/src/retina/site git:docs-bug*
> npm run serve

> [email protected] serve
> docusaurus serve


  ------------------------------------------------------------------------------------------------------------------------------------------------------

                                                              Update available 3.6.1 → 3.6.3

                                    To upgrade Docusaurus packages with the latest version, run the following command:
      `npm i @docusaurus/core@latest @docusaurus/plugin-ideal-image@latest @docusaurus/preset-classic@latest @docusaurus/module-type-aliases@latest
                                                  @docusaurus/tsconfig@latest @docusaurus/types@latest`

  ------------------------------------------------------------------------------------------------------------------------------------------------------

[SUCCESS] Serving "build" directory at: http://localhost:3000/

@kamilprz kamilprz mentioned this issue Jan 2, 2025
7 tasks
@kamilprz kamilprz closed this as completed Jan 2, 2025
github-merge-queue bot pushed a commit that referenced this issue Jan 2, 2025
# Description

Tiny fix to change a typo from `pod` to `prod`.

## Related Issue

[1070](#1070) - originally the
issue was for an error in building the docs, but was unable to replicate
the issue and marking it as closed. During investigation found this
typo.

## Checklist

- [x] I have read the [contributing
documentation](https://retina.sh/docs/contributing).
- [x] I signed and signed-off the commits (`git commit -S -s ...`). See
[this
documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)
on signing commits.
- [x] I have correctly attributed the author(s) of the code.
- [x] I have tested the changes locally.
- [x] I have followed the project's style guidelines.
- [x] I have updated the documentation, if necessary.
- [x] I have added tests, if applicable.

---

Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more
information on how to contribute to this project.

Signed-off-by: Kamil <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Improvements or additions to documentation good first issue Good for newcomers scope/S Change is Small
Projects
Archived in project
Development

No branches or pull requests

1 participant