How to run Next.js and Jest concurrently, with an instance of Next.js already running? #87116
-
SummaryI have this script in my Next.js project, where I start a Next.js server (because the tests need it) and run Jest tests using concurrently: It was working fine until i updated Next.js to version 16. In previous versions, it was possible to have multiple Next.js instances running on the same project, but in Next.js 16 it isn't anymore. Because of this, when I have my development server running and run this test command above, Next.js exits with code 1 because it can't start a second instance, and because of the If I don't use the I would need one of this solutions, or others:
However, I don't know how to do any of those solutions, or if there would be a better one. Additional informationNo response ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Maybe you need to set this to false for testing:
module.exports = {
experimental: {
lockDistDir: false
}
} |
Beta Was this translation helpful? Give feedback.
I linked the config-shared file, which lists all the options for
next.config.js