Next.js Discord

Discord Forum

Custom server with nodemon - @path imports not found

Unanswered
American Curl posted this in #help-forum
Open in Discord
American CurlOP
When i try and use a custom server with ts and nodemon following the official example at https://github.com/vercel/next.js/tree/canary/examples/custom-server all import using @ from "@/*": ["src/*"] are not found. Not just in the server file itself but all the way down the tree when i run the server through ts-node with nodemon. Why is that I how can I fix it?

1 Reply

American CurlOP
If anyone is interested the solution to the above is to install and configure the module-alias npm package.