N
Nuxt2mo ago
Smaug

Nuxt 4.2.0 bug: Object.entries error with vue-bundle

Hello, since Nuxt 4.2.0 have been released I have an error when I try to deploy ma website - The website perfectly work with Nuxt 4.1.3 - When upgrading nuxt the error appear (I've used npx nuxt upgrade --dedupe) If anyone has any ideas, it would help me a lot ! Error [request error] [unhandled] [GET] https://alexandrie-hub.fr/__nuxt_error?error=true&url=%2F&statusCode=500&statusMessage=Server+Error&message=Server+Error 1|alexandr | 10 | _dependencies: void 0, 1|alexandr | 11 | _dependencySets: void 0, 1|alexandr | 12 | _entrypoints: void 0 1|alexandr | 13 | }; 1|alexandr | 14 | function updateManifest(manifest2) { 1|alexandr | 15 | const manifestEntries = Object.entries(manifest2); 1|alexandr | ^ 1|alexandr | error: Object.entries requires that input parameter not be null or undefined 1|alexandr | statusCode: 500, 1|alexandr | fatal: false, 1|alexandr | unhandled: true, 1|alexandr | statusMessage: undefined, 1|alexandr | data: undefined, 1|alexandr | 1|alexandr | at entries (unknown:1:1) 1|alexandr | at updateManifest (/home/smaug/sites/alexandrie/frontend/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs:15:36) 1|alexandr | at createRendererContext (/home/smaug/sites/alexandrie/frontend/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs:24:1) 1|alexandr | at createRenderer (/home/smaug/sites/alexandrie/frontend/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs:187:27) 1|alexandr | at /home/smaug/sites/alexandrie/frontend/.output/server/chunks/routes/renderer.mjs:1:77 1|alexandr | at processTicksAndRejections (native:7:39) 1|alexandr | 1|alexandr | 10 | _dependencies: void 0, 1|alexandr | 11 | _dependencySets: void 0, 1|alexandr | 12 | _entrypoints: void 0 1|alexandr | 13 | }; 1|alexandr | 14 | function updateManifest(manifest2) { 1|alexandr | 15 | const manifestEntries = Object.entries(manifest2); 1|alexandr | ^
No description
6 Replies
kapa.ai
kapa.ai2mo ago
Hi @Smaug. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- The error you are encountering:
Object.entries requires that input parameter not be null or undefined
Object.entries requires that input parameter not be null or undefined
is happening because Object.entries(manifest2) is being called with manifest2 as null or undefined. This is traced to the vue-bundle-renderer package, which is used internally by Nuxt for server-side rendering. What changed in Nuxt 4.2.0? There is no explicit mention in the provided knowledge sources of a breaking change in Nuxt 4.2.0 that would directly cause this error. However, there is a related pull request that optimizes object iteration in Nuxt by avoiding array iterators over objects, which could potentially expose cases where an object is unexpectedly null or undefined if not properly guarded before iteration. This change could make previously "silent" issues now throw errors if the input is not always an object as expected perf: avoid array iterators over objects. Additionally, the vue-bundle-renderer package was updated to support Vite v7 manifest types, but there is no indication in the changelog that this would cause the error you are seeing chore(deps): update dependency vue-bundle-renderer to v2.1.2 (main). What can you do? - Check for null/undefined: The error suggests that somewhere in your build or deployment, the manifest object is not being generated or passed correctly. Ensure that the build process completes successfully and that all required files are present. - Upgrade Nuxt: You mentioned that the website works with Nuxt 4.3.1. If possible, upgrade to this version, as it may contain fixes or improvements that resolve this issue. - Check for related issues: There are no direct reports of this specific error in the provided knowledge sources, but similar issues have been reported when dependencies are not deduped or when there are mismatches between package versions. Running npx nuxt upgrade --dedupe is the correct approach, but ensure all dependencies are aligned and lockfiles are refreshed. Summary This error is likely due to a missing or malformed manifest object, possibly exposed by internal changes in how Nuxt or its dependencies handle object iteration. Upgrading to a newer Nuxt version (like 4.3.1) where you confirmed it works is the best solution. If you must use 4.2.0, ensure your build process is not skipping any steps and that all output files are present and valid. If the problem persists and you need to stay on 4.2.0, you may need to add a guard before calling Object.entries in your own code or check for updates/patches in the vue-bundle-renderer package. If you need more specific help, please provide a minimal reproduction or more details about your build setup. --- If you have further details or logs, feel free to share them for a more targeted diagnosis. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2mo ago
<@611468402263064577> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Smaug
SmaugOP2mo ago
Error in my message. Works on nuxt 4.1.3. So this is a bug in nuxt 4.2.0? Because the introduction of break changes in nuxt 4.2.0 has not been mentioned anywhere. @kapa.ai Error in my message. Works on nuxt 4.1.3. So this is a bug in nuxt 4.2.0? Because the introduction of break changes in nuxt 4.2.0 has not been mentioned anywhere.
kapa.ai
kapa.ai2mo ago
Let me check the knowledge base for you again. One moment! :books: ---------------------- Based on the provided knowledge sources, there is no explicit mention of a breaking change in Nuxt 4.2.0 that would cause the Object.entries error you described. The upgrade guide and changelogs do not document such a breaking change or any related migration steps for this version Upgrade Guide. However, there are reports of issues and regressions introduced in some Nuxt 4.x releases, especially around dependency handling and integration with certain plugins or experimental features. The error you are seeing appears to be an unintended bug rather than an intentional breaking change. If the same code works in 4.1.3 but fails in 4.2.0, and there is no documentation of a required migration, this strongly suggests a regression or an unintentional side effect in the 4.2.0 release. If you need to stay on 4.2.0, you may want to check for open or closed issues on the Nuxt GitHub repository, or consider upgrading to a later version where you have confirmed the issue is resolved. If you believe this is a bug, you can also report it following the Nuxt bug reporting guidelines. In summary:
There is no documented breaking change in Nuxt 4.2.0 related to your error. It is likely a bug or regression introduced in that release, not an intentional change in behavior. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2mo ago
<@611468402263064577> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Smaug
SmaugOP2mo ago
It would appear that the build and run works locally but not during deployment, and the error does not allow us to identify what the problem is Problem fixed; related to an incorrect dependency update.

Did you find this page helpful?