I am testing out a new lambda function (contact form which calls a netlify lambda function which then calls a sendgrid API to send an email) and experimenting with netlify dev
I will run
npx netlify dev
and I get the below, pointing to port 8888
(node:90308) ExperimentalWarning: queueMicrotask() is experimental. (node:90308) ExperimentalWarning: The fs.promises API is experimental ◈ Netlify Dev ◈ ◈ Injected build settings env var: SENDGRID_API_KEY ◈ Ignored general context env var: LANG (defined in process) ? Multiple possible start commands found Hugo-hugo server -w Add 'framework = "hugo"' to the [dev] section of your netlify.toml to avoid this selection prompt next time ◈ Loaded function mailer. ◈ Loaded function newsletter_sub. ◈ Functions server is listening on 55706 ◈ Starting Netlify Dev with Hugo Start building sites … hugo v0.87.0+extended darwin/amd64 BuildDate=unknown | EN -------------------+----- Pages | 29 Paginator pages | 0 Non-page files | 18 Static files | 46 Processed images | 40 Aliases | 0 Sitemaps | 1 Cleaned | 0 Built in 1539 ms Environment: "development" Serving pages from memory Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender Web Server is available at http://localhost:1313/ (bind address 127.0.0.1) Press Ctrl+C to stop
By default it’ll automatically open http://localhost:8888/
however, all links I click on the site take me to http://localhost:8888/enter_path_here but simply renders the home page. Thus I’m unable to test any functions because I can’t actually navigate to any of the pages where the function calls are made.
I feel like this might be something related to how I define my relative paths in the Hugo build, but I can’t figure it out.
The site builds fine locally (i.e. when I run hugo server and navigate on the default localhost:1313, and the site works fine on prod)