Build error while running yarn build after upgrading to version 16
Unanswered
Spectacled bear posted this in #help-forum
Spectacled bearOP
Hi team, this morning I've upgraded my next version to "16.0.6" and now I can't build my app anymore because of a build error thrown from one of my packages in the node_modules folder. I'm actually full of errors, I leave a stack trace as example but the actual list is way bigger:
as u can see the error is coming from a test file of the thread-stream file? What? Why should it throw or even be included in the build process? To upgrade version of the project I've used a codemod as described in https://nextjs.org/docs/app/guides/upgrading/version-16#nodejs-runtime-and-browser-support, so I've just ran:
./GoodWalletV2/node_modules/thread-stream/test/indexes.test.js:3:18
Module not found: Can't resolve 'tap'
1 | 'use strict'
2 |
> 3 | const { test } = require('tap')
| ^^^^^^^^^^^^^^
4 | const indexes = require('../lib/indexes')
5 |
6 | for (const index of Object.keys(indexes)) {
Import trace:
Client Component SSR:
./GoodWalletV2/node_modules/thread-stream/test/indexes.test.js [Client Component SSR]
./GoodWalletV2/node_modules/thread-stream/index.js [Client Component SSR]
./GoodWalletV2/node_modules/pino/lib/transport.js [Client Component SSR]
./GoodWalletV2/node_modules/pino/pino.js [Client Component SSR]
./GoodWalletV2/node_modules/@walletconnect/logger/dist/index.es.js [Client Component SSR]
./GoodWalletV2/node_modules/@walletconnect/core/dist/index.js [Client Component SSR]
./GoodWalletV2/src/sections/WalletConnect/store/walletConnectStore.ts [Client Component SSR]
./GoodWalletV2/src/sections/Home/components/WalletSection.tsx [Client Component SSR]
./GoodWalletV2/src/sections/Home/components/WalletSection.tsx [Server Component]
./GoodWalletV2/src/sections/Home/HomeView.tsx [Server Component]
./GoodWalletV2/src/app/[locale]/@home/(home)/layout.tsx [Server Component]
https://nextjs.org/docs/messages/module-not-foundas u can see the error is coming from a test file of the thread-stream file? What? Why should it throw or even be included in the build process? To upgrade version of the project I've used a codemod as described in https://nextjs.org/docs/app/guides/upgrading/version-16#nodejs-runtime-and-browser-support, so I've just ran:
npx @next/codemod@canary upgrade latest1 Reply
@Spectacled bear Hi team, this morning I've upgraded my next version to "16.0.6" and now I can't build my app anymore because of a build error thrown from one of my packages in the node_modules folder. I'm actually full of errors, I leave a stack trace as example but the actual list is way bigger:
./GoodWalletV2/node_modules/thread-stream/test/indexes.test.js:3:18
Module not found: Can't resolve 'tap'
1 | 'use strict'
2 |
> 3 | const { test } = require('tap')
| ^^^^^^^^^^^^^^
4 | const indexes = require('../lib/indexes')
5 |
6 | for (const index of Object.keys(indexes)) {
Import trace:
Client Component SSR:
./GoodWalletV2/node_modules/thread-stream/test/indexes.test.js [Client Component SSR]
./GoodWalletV2/node_modules/thread-stream/index.js [Client Component SSR]
./GoodWalletV2/node_modules/pino/lib/transport.js [Client Component SSR]
./GoodWalletV2/node_modules/pino/pino.js [Client Component SSR]
./GoodWalletV2/node_modules/@walletconnect/logger/dist/index.es.js [Client Component SSR]
./GoodWalletV2/node_modules/@walletconnect/core/dist/index.js [Client Component SSR]
./GoodWalletV2/src/sections/WalletConnect/store/walletConnectStore.ts [Client Component SSR]
./GoodWalletV2/src/sections/Home/components/WalletSection.tsx [Client Component SSR]
./GoodWalletV2/src/sections/Home/components/WalletSection.tsx [Server Component]
./GoodWalletV2/src/sections/Home/HomeView.tsx [Server Component]
./GoodWalletV2/src/app/[locale]/@home/(home)/layout.tsx [Server Component]
https://nextjs.org/docs/messages/module-not-found
as u can see the error is coming from a test file of the thread-stream file? What? Why should it throw or even be included in the build process? To upgrade version of the project I've used a codemod as described in https://nextjs.org/docs/app/guides/upgrading/version-16#nodejs-runtime-and-browser-support, so I've just ran: npx @next/codemod@canary upgrade latest
Rampur Greyhound
Have you found a way to fix this? I've also got this now. And given that https://nextjs.org/blog/CVE-2025-66478 is out, I appreciate that they'll resolve it quickly.
https://github.com/vercel/next.js/issues/86099
https://github.com/vercel/next.js/issues/86099