Skip to content

[BUG]: ERR_INVALID_RETURN_PROPERTY_VALUE error when starting up Nuxt 3 app #5720

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
paambaati opened this issue May 13, 2025 · 0 comments
Open
Labels
bug Something isn't working

Comments

@paambaati
Copy link

paambaati commented May 13, 2025

Tracer Version(s)

5.51.0, 5.50, 5.49.0

Node.js Version(s)

20.18.1

Bug Report

When starting up a Nuxt 3 app like this –

node --import dd-trace/register.js --trace-warnings .output/server/index.mjs

I get this error –

❯ node --import dd-trace/register.js --trace-warnings .output/server/index.mjs
node:internal/modules/esm/translators:129
  throw new ERR_INVALID_RETURN_PROPERTY_VALUE(
        ^

TypeError [ERR_INVALID_RETURN_PROPERTY_VALUE]: Expected string, array buffer, or typed array to be returned for the "source" from the "load" hook but got undefined.
    at assertBufferSource (node:internal/modules/esm/translators:129:9)
    at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:164:3)
    at callTranslator (node:internal/modules/esm/loader:428:14)
    at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:434:30) {
  code: 'ERR_INVALID_RETURN_PROPERTY_VALUE'
}

Node.js v20.18.1

Curiously, when starting the app without the --import dd-trace/register.js flag, the app starts up fine without issues.

Reproduction Code

  1. Set up a Nuxt 3 app (issue reproducible with both Vite 2.x and Vite 3.x).
  2. Build it using nuxt build.
  3. Start it using node --import dd-trace/register.js .output/server/index.mjs

Error Logs

node:internal/modules/esm/translators:129
  throw new ERR_INVALID_RETURN_PROPERTY_VALUE(
        ^

TypeError [ERR_INVALID_RETURN_PROPERTY_VALUE]: Expected string, array buffer, or typed array to be returned for the "source" from the "load" hook but got undefined.
    at assertBufferSource (node:internal/modules/esm/translators:129:9)
    at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:164:3)
    at callTranslator (node:internal/modules/esm/loader:428:14)
    at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:434:30) {
  code: 'ERR_INVALID_RETURN_PROPERTY_VALUE'
}

Node.js v20.18.1

Tracer Config

DD_APM_ENABLED: true
DD_TRACE_ENABLED: true
DD_LOGS_INJECTION: true

Operating System

Darwin Mac 24.4.0 Darwin Kernel Version 24.4.0: Fri Apr 11 18:33:47 PDT 2025; root:xnu-11417.101.15~117/RELEASE_ARM64_T6030 arm64

Bundling

Vite

@paambaati paambaati added the bug Something isn't working label May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant