Skip to content
This repository was archived by the owner on Dec 12, 2023. It is now read-only.
This repository was archived by the owner on Dec 12, 2023. It is now read-only.

Cannot find module 'argon2/lib/binding/napi-v3/argon2.node' #86

Open
@waltkb

Description

@waltkb

Environment

  • Operating System: Linux
  • Node Version: v20.5.0
  • Nuxt Version: 3.6.5
  • Nitro Version: 2.5.2
  • Package Manager: [email protected]
  • Builder: vite
  • User Config: devtools, modules
  • Runtime Modules: @sidebase/[email protected]
  • Build Modules: -

Reproduction

pnpx nuxi init
pnpm i -D @sidebase/nuxt-session
# add `modules: ['@sidebase/nuxt-session']` to `nuxt.config.ts`
pnpm dev

Describe the bug

The console prints the error below, and when visiting the webpage it returns 503 Server Unavailable and the error below:

ERROR  [worker reload] [worker init] Cannot find module '/home/user/IdeaProjects/nuxt-app/node_modules/.pnpm/[email protected]/node_modules/argon2/lib/binding/napi-v3/argon2.node'

Require stack:
- /home/user/IdeaProjects/nuxt-app/node_modules/.pnpm/[email protected]/node_modules/argon2/argon2.js

  Require stack:
  - node_modules/.pnpm/[email protected]/node_modules/argon2/argon2.js
  at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
  at Module._load (node:internal/modules/cjs/loader:901:27)
  at Module.require (node:internal/modules/cjs/loader:1115:19)
  at require (node:internal/modules/helpers:119:18)
  at Object.<anonymous> (node_modules/.pnpm/[email protected]/node_modules/argon2/argon2.js:9:25)
  at Module._compile (node:internal/modules/cjs/loader:1233:14)
  at Module._extensions..js (node:internal/modules/cjs/loader:1287:10)
  at Module.load (node:internal/modules/cjs/loader:1091:32)
  at Module._load (node:internal/modules/cjs/loader:938:12)
  at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:165:29)

This error does not occur when modules: ['@sidebase/nuxt-session'] is removed from nuxt.config.ts.

Additional context

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions