Skip to content

import-in-the-middle fails with yarn 1.22 #14449

Closed

Description

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Which SDK are you using?

@sentry/nuxt

SDK Version

8.40.0

Framework Version

nuxt 3.12.4

Link to Sentry event

No response

Reproduction Example/SDK Setup

Hey, I get error:

node:internal/modules/esm/resolve:265
    throw new ERR_MODULE_NOT_FOUND(
          ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/test/project/.output/server/node_modules/import-in-the-middle/hook.mjs' imported from /home/test/project/.output/server/index.mjs
    at finalizeResolution (node:internal/modules/esm/resolve:265:11)
    at moduleResolve (node:internal/modules/esm/resolve:933:10)
    at defaultResolve (node:internal/modules/esm/resolve:1157:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:383:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:352:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:227:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:87:39)
    at link (node:internal/modules/esm/module_job:86:36) {
  code: 'ERR_MODULE_NOT_FOUND',
}

I use yarn in version 1.22.22. I also added "import-in-the-middle": "1.11.2", to deps. But it still fails. Is there some base setup guidline to use sentry for nuxt3? I want to make it work. If there will be missing some features then it's fine. As soon as sentry/nuxt will work I will jump on it. But right now I can't make it work

Steps to Reproduce

  1. build project
  2. run start with node .output/server/index.mjs

Expected Result

Do not get error

Actual Result

node:internal/modules/esm/resolve:265
    throw new ERR_MODULE_NOT_FOUND(
          ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/test/project/.output/server/node_modules/import-in-the-middle/hook.mjs' imported from /home/test/project/.output/server/index.mjs
    at finalizeResolution (node:internal/modules/esm/resolve:265:11)
    at moduleResolve (node:internal/modules/esm/resolve:933:10)
    at defaultResolve (node:internal/modules/esm/resolve:1157:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:383:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:352:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:227:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:87:39)
    at link (node:internal/modules/esm/module_job:86:36) {
  code: 'ERR_MODULE_NOT_FOUND',
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Package: nuxtIssues related to the Sentry Nuxt SDK

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions