hanbaobao
hanbaobao
CDCloudflare Developers
Created by hanbaobao on 4/1/2025 in #pages-help
Getting `wrangler pages dev` to work with nextjs
Hmm, I seem to have solved this... seems like a noob issue, but nevertheless, to whoever that is lost like me You would need to build the page first before it can be served. In package.json there is a line "preview": "npm run pages:build && wrangler pages dev" So to run the webpage, we will need to 1) navigate to the folder with package.json 2) (as I am using dev container) add --ip 127.0.0.1 to the preview entry in package.json 3) execute the following command npm run preview
2 replies