Cannot convert undefined or null to object
See original GitHub issueEnvironment
Operating System: windows 10 Node Version: v16.17.0 Nuxt Version: 2.16.0-27717142.54e852f Bridge Version: npm:@nuxt/bridge-edge@^3.0.0-27718044.2f69fe0 Nitro Version: false Package Manager: npm@8.19.1 Builder: webpack Runtime Modules: -
Reproduction
https://github.com/wtagain/nuxt-bug-template
Describe the bug
as the issue https://github.com/nuxt/bridge/issues/369 Iโve disable the nitro
import { defineNuxtConfig } from "@nuxt/bridge";
export default defineNuxtConfig({
bridge: {
nitro: false,
},
});
then I use nuxt build
and use nuxt start
FATAL Cannot convert undefined or null to object
Additional context
No response
Logs
C:\code\nuxt-bug-template>npx nuxt build
i Production build 00:31:35
i Bundling for server and client side 00:31:35
i Target: server 00:31:35
โ Builder initialized 00:31:35
โ Nuxt files generated 00:31:35
โ Client
Compiled successfully in 8.58s
โ Server
Compiled successfully in 1.31s
Hash: 570b483c47c0911f454b
Version: webpack 4.46.0
Time: 8581ms
Built at: 2022/09/14 00:31:45
Asset Size Chunks Chunk Names
../server/client.manifest.json 12.4 KiB [emitted]
016a953.js 2.29 KiB 3 [emitted] [immutable] runtime
0771d55.js 218 KiB 1 [emitted] [immutable] commons/app
36500ce.js 43.3 KiB 0 [emitted] [immutable] app
87ebd97.js 242 bytes 2 [emitted] [immutable] pages/index
LICENSES 472 bytes [emitted]
e78b2b8.js 54.3 KiB 4 [emitted] [immutable] vendors/app
+ 2 hidden assets
Entrypoint app = 016a953.js 0771d55.js e78b2b8.js 36500ce.js
Hash: 76b61f98b8323ad00600
Version: webpack 4.46.0
Time: 1315ms
Built at: 2022/09/14 00:31:46
Asset Size Chunks Chunk Names
pages/index.js 2.01 KiB 1 [emitted] pages/index
server.js 358 KiB 0 [emitted] app
server.manifest.json 207 bytes [emitted]
+ 2 hidden assets
Entrypoint app = server.js server.js.map
i Ready to run nuxt start 00:31:46
C:\code\nuxt-bug-template>npx nuxt start
FATAL Cannot convert undefined or null to object 00:32:07
at Function.keys (<anonymous>)
at node_modules\vue-server-renderer\build.prod.js:1:71756
at vo (node_modules\vue-server-renderer\build.prod.js:1:71959)
at new xo (node_modules\vue-server-renderer\build.prod.js:1:72923)
at node_modules\vue-server-renderer\build.prod.js:1:78383
at zo (node_modules\vue-server-renderer\build.prod.js:1:79262)
at Object.createBundleRenderer (node_modules\vue-server-renderer\build.prod.js:1:80064)
at SSRRenderer.createRenderer (node_modules\@nuxt\vue-renderer-edge\dist\vue-renderer.js:218:30)
at new BaseRenderer (node_modules\@nuxt\vue-renderer-edge\dist\vue-renderer.js:40:29)
at new SSRRenderer (node_modules\@nuxt\vue-renderer-edge\dist\vue-renderer.js:178:1)
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ โ Nuxt Fatal Error โ
โ โ
โ TypeError: Cannot convert undefined or null to object โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Issue Analytics
- State:
- Created a year ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Cannot convert undefined or null to object - Stack Overflow
Generic answer. This error is caused when you call a function that expects an Object as its argument, but pass undefined or null...
Read more >Cannot convert undefined or null to Object in JavaScript
The "Cannot convert undefined or null to Object" error occurs when we pass a null or an undefined value to a function that...
Read more >Object.keys(null) possible - cannot convert undefined or null to ...
Conditions above this line allow msg===null to get into Object.keys(msg);. livedata_connection.js:1626 Uncaught TypeError: Cannot convertย ...
Read more >Edit Profile script issue: Cannot convert undefined or null to ...
Hi there, I'm getting this error Cannot convert undefined or null to object when editing profile using the /edit-profile page.
Read more >Cannot convert undefined or null to object - JavaScript
JavaScript : How to resolve TypeError: Cannot convert undefined or null to object [ Gift : Animated Search Engineย ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Iโve created a minimal reproduction: https://codesandbox.io/s/bridge-cannot-convert-undefined-null-3yv6z7?file=/package.json Edit: you need to run a
build
andstart
in the console to see that error.@danielroe Awesome! So when the bridge option vite is false, nitro is false, which command do I use to build,
nuxi build
ornuxt build
?