Open blumgart opened 1 year ago
Hey @blumgart, thanks for the issue!
pinging @Voltra who implemented this, care to have a look? -> interesting that somebody switched to bcrypt because of it here: https://github.com/nuxt/nuxt.js/issues/15057 (very good link, thanks @blumgart)
Encountering the same issue. Resolved once the package was removed.
@BracketJohn Just confirmed Argon2 to be the issue preventing building.
import * as bcrypt from 'bcrypt';
. . .
export const hashIpAddress = (ip) => !ip ? Promise.resolve(void 0) : bcrypt.hashSync(ip);
export const ipAddressesMatch = (ip, ipHash) => !ip && !ipHash ? Promise.resolve(false) : bcrypt.compareSync(ip, ipHash);
That snippet does not use any salt rounds and defaults to 10. Replacing those respective lines from Argon2 to bcrypt fixes the problem with no build issues. I have not tested this properly yet as I do not use this feature so I have not opened a pull request on this. https://github.com/sidebase/nuxt-session/blob/main/src/runtime/server/middleware/session/ipPinning.ts
Environment
Windows_NT
v16.15.0
3.0.0-rc.13
0.6.1
yarn@1.22.17
vite
app
,build
,googleFonts
,modules
,session
,image
,routeRules
,runtimeConfig
,strapi
@sidebase/nuxt-session@0.2.5
,@nuxtjs/tailwindcss@6.1.3
,@nuxtjs/strapi@1.6.3
,@nuxt/image-edge@1.0.0-27809804.194d2d6
,@vueuse/nuxt@9.6.0
,nuxt-icon@0.1.7
,@nuxtjs/google-fonts@3.0.0-1
,@pinia/nuxt@0.4.5
Build Modules:
-
Reproduction
No response
Describe the bug
After upgrade from 0.2.3 to 0.2.5 and trying
yarn build
i get this error:Similar problem - nuxt/nuxt.js#15057
npm ls argon2
Additional context
No response
Logs
No response