Closed birdzai closed 3 weeks ago
Hey @birdzai , Thanks for reporting. Did you try what's recommended in the message?
Packages that should be external need to be installed in the project directory, so they can be resolved from the output files. Try to install it into the project directory by running npm install jsdom from the project directory.
Yes, manually installing jsdom into node_modules fixed the error. I wasn't sure if you needed to be informed of having to perform this as something you cared about, so I thought I would raise it as an issue. Go ahead and close this issue if you think that's ok.
Thanks @birdzai. We hadn't change much in this project since Next.js 14, so it's likely it's related to the latest Next.js update. But adding jsdom to external dependencies is a way to do it currently, though I understand that it's not very convenient https://github.com/kkomelin/isomorphic-dompurify/issues/54#issuecomment-1458603825
Thanks again for reporting @birdzai !
I thought I would test out upgrading a project to the newly release Next.js V15 and when running the app I'm getting this error in the server logs:
I of course followed the suggestion of manually installing jsdom into my node_modules folder, but I hadn't needed to do this before.