question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

can't build bridge project with `ipx` in serverMiddleware

See original GitHub issue

Environment

  • nuxt-bridge: 3.0.0-27235989.d52b1e8
  • node: v12.14.0

Describe the bug

If I try to run the project an error occur ( see screenshot below )

image

Reproduction

  • Install nuxt/bridge as explained in the nuxt docs
  • run npm run dev

Additional context

No response

Logs

FATAL  Cannot read property 'default' of undefined                                                                                                                                         01:45:23

  at nuxt.config.js:12:186
  at v (node_modules/jiti/dist/jiti.js:1:54801)
  at Object.loadNuxtConfig (node_modules/@nuxt/config-edge/dist/config.js:819:15)
  at loadNuxtConfig (node_modules/nuxt-edge/node_modules/@nuxt/cli-edge/dist/cli-index.js:310:36)
  at NuxtCommand.getNuxtConfig (node_modules/nuxt-edge/node_modules/@nuxt/cli-edge/dist/cli-index.js:412:26)
  at Object._listenDev (node_modules/nuxt-edge/node_modules/@nuxt/cli-edge/dist/cli-dev.js:69:30)
  at Object.startDev (node_modules/nuxt-edge/node_modules/@nuxt/cli-edge/dist/cli-dev.js:55:25)
  at Object.run (node_modules/nuxt-edge/node_modules/@nuxt/cli-edge/dist/cli-dev.js:50:16)
  at NuxtCommand.run (node_modules/nuxt-edge/node_modules/@nuxt/cli-edge/dist/cli-index.js:371:22)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
thomas4Bitcraftcommented, Oct 25, 2021

mhm I think this is coming from IPX. There is the line

import { stat, readFile } from 'fs-extra'; in ipx/dist/index.mjs

EDIT: There is already an issue for that https://github.com/unjs/ipx/issues/50

1reaction
IsraelOrtunocommented, Oct 14, 2021

I think Node 14+ is required. This fragment from docs:

“* If you already have Node.js installed, check with node --version that you are using v14 or v16.” https://v3.nuxtjs.org/getting-started/introduction#prerequisites

Read more comments on GitHub >

github_iconTop Results From Across the Web

The serverMiddleware Property - Nuxt
This allows you to create a client API/server API pattern using Nuxt alone. This means that from the browser (for example, within a...
Read more >
Nuxt - server middleware not working on production
I found an answer on github issue nuxt repo: This is correct - server middleware aren't compiled or part of your webpack build...
Read more >
Issue Using Sharp Package In Nuxt - ADocLib
I get error during building in Vercel I choose node version 14 for project. 04:18:53.671 sharp: Downloading https://github.com/lovell/sharplibvips/. Nuxt can be ...
Read more >
Package Diff: @netlify/plugin-nextjs @ 4.14.2 .. 4.18.0
Create a 'middleware.ts' or 'middleware.js' file in your project root to add custom ... await copyEdgeSourceFile({ edgeFunctionDir, file: 'ipx.ts', ...
Read more >
Can't build bridges...bug? :: Cliff Empire General Discussions
I had the same problem at first . What I do now is place all of my bridges early in the game but...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found