yihua opened a new pull request #4708:
URL: https://github.com/apache/hudi/pull/4708


   ## What is the purpose of the pull request
   
   The build of Hudi website is broken due to the following error from `npm run 
build`:
   ```
   (asf-site)> npm run build
   
   > [email protected] build
   > docusaurus build
   
   [INFO] Website will be built for all these locales: 
   - en
   - cn
   [INFO] [en] Creating an optimized production build...
   
   ✔ Client
     
   ✖ Server
     Compiled with some errors in 2.64m
   
   [ERROR] Docusaurus Node/SSR could not render static page with path / because 
of following error:
   Error: Minified React error #130; visit 
https://reactjs.org/docs/error-decoder.html?invariant=130&args[]=object&args[]= 
for the full message or use the non-minified dev environment for full errors 
and additional helpful warnings.
       at a.b.render (main:115785:32)
       at a.b.read (main:115781:83)
       at Object.exports.renderToString (main:115792:138)
       at doRender (main:25801:356)
       at async serverEntry_render (main:25797:329)
   
   Error: Server-side rendering fails due to the error above.
   [ERROR] Unable to build website for locale en.
   [ERROR] Error: Failed to compile with errors.
       at 
/Users/ethan/Work/repo/hudi-docs-8/website/node_modules/@docusaurus/core/lib/webpack/utils.js:207:24
       at 
/Users/ethan/Work/repo/hudi-docs-8/website/node_modules/webpack/lib/MultiCompiler.js:554:14
       at processQueueWorker 
(/Users/ethan/Work/repo/hudi-docs-8/website/node_modules/webpack/lib/MultiCompiler.js:491:6)
       at processTicksAndRejections (node:internal/process/task_queues:78:11)
   ```
   
   The root cause is that docusaurus versions specified in 
`website/package.json` are not honored.  Looking at the 
`website/package-lock.json` generated, `2.0.0-beta.15` is actually used instead 
of `^2.0.0-beta.3` (up to 2.0.0-beta.3) specified.  Another evidence of higher 
version already used is that `2.0.0-beta.14` shows up in generated content:
   
   ```
   ./content/docs/next/clustering/index.html:<meta name="generator" 
content="Docusaurus v2.0.0-beta.14">
   ```
   
   The build failure is likely due to recent new versions (`2.0.0-beta.15`, 
`2.0.0-beta.16`) of docusaurus and related dependencies.
   
   The fix is to bound the docusaurus version properly.
   
   Note that the build failure can only be reproduced from a fresh clone of the 
branch from remote, with `npm install` and `npm run build` under `website` 
folder.  If there is previous successful build and package info is cached, such 
build failure may not show up.
   
   ## Brief change log
   
     - Updates `website/package.json` to bound the docusaurus version properly.
   
   ## Verify this pull request
   
   The change is verified by a fresh build of the website.  The website can be 
successfully launched after `npm start`.
   
   ## Committer checklist
   
    - [ ] Has a corresponding JIRA in PR title & commit
    
    - [ ] Commit message is descriptive of the change
    
    - [ ] CI is green
   
    - [ ] Necessary doc changes done or have another open PR
          
    - [ ] For large changes, please consider breaking it into sub-tasks under 
an umbrella JIRA.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to