rollupjs.org icon indicating copy to clipboard operation
rollupjs.org copied to clipboard

Build instructions don't work

Open AntonOfTheWoods opened this issue 1 year ago • 4 comments

In order to attempt to consult the documentation due to https://github.com/rollup/rollupjs.org/issues/242, I attempted to build and run the site locally. I get the following error under the menu bar on the local site after building:

500
invalid json response body at http://127.0.0.1:3000/guide/en.json reason: Unexpected token E in JSON at position 0

FetchError: invalid json response body at http://127.0.0.1:3000/guide/en.json reason: Unexpected token E in JSON at position 0
    at /home/anton/dev/tmp/rollupjs.org/src/node_modules/@sapper/server.mjs:777:35
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Promise.all (index 2)

AntonOfTheWoods avatar Aug 05 '22 06:08 AntonOfTheWoods

If docs are what you are after, instead of npm run dev try building the app using npm run build and then run npx serve __sapper__/export or npm run dev

Once the app is built, the missing files are generated. image

ItsKDaniel avatar Aug 05 '22 07:08 ItsKDaniel

Thanks, that was not at all clear from the README. I added that to the instructions in the mentioned PR.

AntonOfTheWoods avatar Aug 05 '22 08:08 AntonOfTheWoods

Instead of building the whole application, executing the below npm commands work, for starting the site in local

npm install
npm run update-guide
npm run generate-graphs
npm run dev

ItsKDaniel avatar Aug 05 '22 08:08 ItsKDaniel

@ItsKDaniel , so that would also mean changing the text from "Steps to build the website locally" to "Steps to run the website locally"?

AntonOfTheWoods avatar Aug 06 '22 03:08 AntonOfTheWoods