#Running website locally

17 messages · Page 1 of 1 (latest)

errant gale
#

Apologies but is there a way I can get the website running locally?

I tried ⁨npx next start⁩ and that starts and binds it fine but when I go on the website's home page and click "Docs", it 404s.

I have already run ⁨pnpm run build⁩ as per CONTRIBUTING.md and ⁨pnpm run docs⁩ (before doing ⁨npx next start⁩).

⁨```
main@pc website % npx next start
▲ Next.js 16.0.8

✓ Starting...
[baseline-browser-mapping] The data in this module is over two months old. To ensure accurate Baseline data, please update: npm i baseline-browser-mapping@latest -D
✓ Ready in 176ms


I have run that command inside the websites directory.

Would appreciate some help - just want to make sure that docs I type locally will render correctly on the website.
jagged kestrel
#

pnpm run dev should do the trick, after installing and building the whole monorepo

#

Ah and you need to pnpm run build:local once

errant gale
#

Still 404ing for me unfortunately.

I have run:

⁨```
pnpm run build (in discord.js monorepo root)
cd apps/website
pnpm run build:local
pnpm run dev


Output for ⁨`pnpm run build:local`⁩
⁨```
[... cut out a lot of stuff here and only showed the end ...]
 ✓ Generating static pages using 15 workers (7/7) in 256.0ms
 ✓ Finalizing page optimization in 6.4ms    

Route (app)
┌ ○ /
├ ○ /_not-found
├ ƒ /api/docs/entrypoints
├ ƒ /api/docs/sitemap
├ ƒ /api/docs/versions
├ ƒ /docs/packages/[packageName]/[version]/[[...item]]
└ ○ /opengraph-image


ƒ Proxy (Middleware)

○  (Static)   prerendered as static content
ƒ  (Dynamic)  server-rendered on demand
```⁩
#

Output for ⁨⁨pnpm run dev⁩⁩:
⁨⁨```
main@pc website % pnpm run dev

@discordjs/[email protected] dev /Users/main/git/discord.js/apps/website
next dev --turbopack

[baseline-browser-mapping] The data in this module is over two months old. To ensure accurate Baseline data, please update: npm i baseline-browser-mapping@latest -D
▲ Next.js 16.0.8 (Turbopack)

✓ Starting...
⚠ The "middleware" file convention is deprecated. Please use "proxy" instead. Learn more: https://nextjs.org/docs/messages/middleware-to-proxy
✓ Ready in 573ms
[baseline-browser-mapping] The data in this module is over two months old. To ensure accurate Baseline data, please update: npm i baseline-browser-mapping@latest -D
(node:38032) Warning: --localstorage-file was provided without a valid path
(Use node --trace-warnings ... to show where the warning was created)
GET / 200 in 1421ms (compile: 1322ms, render: 99ms)
GET /docs/packages/discord.js/main 200 in 1142ms (compile: 977ms, render: 164ms)
GET /docs/packages/discord.js/main 404 in 592ms (compile: 427ms, render: 165ms)
GET /docs/packages/discord.js/main 200 in 32ms (compile: 11ms, render: 21ms)
GET / 200 in 52ms (compile: 6ms, render: 46ms)


Just a bit confused since ⁨⁨`pnpm run build:local`⁩⁩ seems to indicate the the pages on those routes are generated...?
jagged kestrel
#

I'm more confused why you get two 200 and a 404 in between for the same route

errant gale
#

yeah ikr, even when it's showing 200, it still renders a 404 page on the browser

nimble shell
#

This is what jira had mentioned

#

I think you missed the step 3

errant gale
# nimble shell

Just run all the commands from your message. Still gives me the same result.

It sends me to http://localhost:3000/docs/packages/discord.js/main which renders a 404 page.

⁨```
main@pc website % pnpm run dev

@discordjs/[email protected] dev /Users/main/git/discord.js/apps/website
next dev --turbopack

[baseline-browser-mapping] The data in this module is over two months old. To ensure accurate Baseline data, please update: npm i baseline-browser-mapping@latest -D
▲ Next.js 16.0.8 (Turbopack)

✓ Starting...
⚠ The "middleware" file convention is deprecated. Please use "proxy" instead. Learn more: https://nextjs.org/docs/messages/middleware-to-proxy
✓ Ready in 569ms
[baseline-browser-mapping] The data in this module is over two months old. To ensure accurate Baseline data, please update: npm i baseline-browser-mapping@latest -D
(node:69183) Warning: --localstorage-file was provided without a valid path
(Use node --trace-warnings ... to show where the warning was created)
GET / 200 in 1416ms (compile: 1308ms, render: 108ms)
GET /docs/packages/discord.js/main 200 in 965ms (compile: 921ms, render: 44ms)
GET /apple-touch-icon-precomposed.png 404 in 225ms (compile: 194ms, render: 31ms)
GET /opengraph-image?744a30463c2eeb17 200 in 360ms (compile: 87ms, render: 274ms)


Just to be sure, I actually made a new folder and re-cloned the git repository for djs and re-ran everything from Jira's message in there. Still no luck. The above snippet is from a branch on my fork, however it is up to date with upstream/main (djs/main).
jagged kestrel
#

If it does then it is an issue with copying the README.md which build:local should do

errant gale
jagged kestrel
#

Did you ever run pnpm run build on website folder? Can you check if there are files in website/src/assets/readme?