GitbookIO / gitbook

The open source frontend for GitBook doc sites
https://www.gitbook.com
GNU General Public License v3.0
27.24k stars 3.88k forks source link

Cannot launch locally on Windows: Internal Server Error for the site with only default contents #2518

Open viatra2 opened 1 month ago

viatra2 commented 1 month ago

Disclaimer: I am very new to gitbook.

I have created a very basic docs site, containing the default contents only. It is published at https://borlander.gitbook.io/borlander-docs, and I am trying to launch the local frontend against this site, following, exactly, the steps from Readme.md.

Checked 1721 installs across 1654 packages (no changes) [444.00ms]


- bun dev
... all looks good

- open `http://localhost:3000/borlander.gitbook.io/borlander-docs/basics/markdown` in Chrome 

=> 

- Page shows `Internal Server Error`
- The bun console for `gitbook#dev` node shows, among a lot of traces, the following error: 

│trace cloudflareDO.get(api.getSite("eiNZhKOsBTlOrNF2raBT","site_VPQBq")) 2.612900000065565ms {} │trace cloudflareDO.get(api.getSiteSpaces(21f175f9b562a4c26a8706c241f1c6275e23c589)) 2.767099999822676ms {}
│trace cloudflareDO.get(api.getSiteCustomizationById("eiNZhKOsBTlOrNF2raBT","site_VPQBq")) 2.930200000293553ms {}
│ ⨯ Internal error: TypeError: Cannot read properties of undefined (reading 'default')
│ at resolveClientReference (../../node_modules/next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.develop │ent.js:87:55)
│ at resolveModule (../../node_modules/next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.development.js:1 │67:35)
│ at processFullRow (../../node_modules/next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.development.js: │740:25)
│ at processBinaryChunk (../../node_modules/next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.development │js:1858:21)
│ at progress (../../node_modules/next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.development.js:1926:1 │)
│digest: "1732920403"
│[TypeError: Cannot read properties of undefined (reading 'default')]
│ ⨯ [TypeError: Cannot read properties of undefined (reading 'default')]
│ ⨯ [TypeError: Cannot read properties of null (reading 'default')]
│ GET /borlander.gitbook.io/borlander-docs/basics/markdown 500 in 6051ms
│ ✓ Compiled in 1231ms (1337 modules)
│trace cloudflareDO.set(api.getSiteIntegrationScripts("eiNZhKOsBTlOrNF2raBT","site_VPQBq")) 0.08810000028461218ms {}
│trace cache.setCacheEntry(api.getSiteIntegrationScripts("eiNZhKOsBTlOrNF2raBT","site_VPQBq")) 0.5449999999254942ms {}



Screenshot: 
![image](https://github.com/user-attachments/assets/fb69a400-8c98-4245-870e-73bcb90ca5c3)
lucapivato commented 3 weeks ago

Same here. Any site returns Internal Server Error.

Yoko-0x0 commented 1 week ago

Same problem on windows- not work. node: 20.6.1

  1. git clone https://github.com/gitbookIO/gitbook.git
  2. bun install
  3. npm run build
  4. bun dev

    Chrome

    image

image image image image image image image image image image image