sidebase / nuxt-session

Nuxt session middleware to get a persistent session per app user, e.g., to store data across multiple requests. The nuxt session module provides the useSession() composable out of the box and sets up API endpoints to interact with your session to make working with sessions feel like a breeze.
https://sidebase.io/nuxt-session/
MIT License
189 stars 19 forks source link

Error in ipPinning.mjs middleware #30

Closed JacobArrow closed 1 year ago

JacobArrow commented 1 year ago

Environment

Reproduction

Update to newest version of nuxt-session

Describe the bug

When I run yarn dev in my Nuxt project after updating this package, the server crashes and I get 503 Server Unavailable

Additional context

No response

Logs

file:///var/www/html/dune/.nuxt/dev/index.mjs:26
import { verify, argon2id, hash as hash$1 } from 'file:///var/www/html/dune/node_modules/argon2/argon2.js';
                 ^^^^^^^^
SyntaxError: Named export 'argon2id' not found. The requested module 'file:///var/www/html/dune/node_modules/argon2/argon2.js' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'file:///var/www/html/dune/node_modules/argon2/argon2.js';
const { verify, argon2id, hash: hash$1 } = pkg;

    at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:181:5)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:281:24)
    at async loadESM (node:internal/process/esm_loader:88:5)
    at async handleMainPromise (node:internal/modules/run_main:65:12)
BracketJohn commented 1 year ago

Hey @JacobArrow!

Thanks for the issue (: We'll haver a loot at it ASAP!

@Voltra, maybe you want to check it out, as it's related to ipPinning?