Hi everyone,
I'm trying to create a dev server programmatically using next, eg:
const app = next({ dev, hostname, port, dir });
However, I'm having a lot of trouble.
1- For whatever reason, I'm forced to add experimental.appDir in the next.config.js file of the directory the server is serving, even though, running next dev directly from the terminal suggests not to add that option.
2- After starting the server, none of the fonts/styles are being loaded, and the console spits out these errors: (see screenshots)
It almost feels like next is running an older version of dev server when launching it programmatically.
3- this is more a nice to have, but is there any way I can tell next to use turbopack when starting the server?
Is there a different configuration that applies to dev servers launch in this way? any help is appreciated!
PS: I'm very to new to next.js, so please bear with me in case this is obvious!