socketio / socket.io-admin-ui

Admin UI for Socket.IO
https://admin.socket.io
MIT License
346 stars 94 forks source link

Switch to bcryptjs instead of bcrypt (or include node-gyp as depency) #50

Closed Thomas-1985 closed 1 year ago

Thomas-1985 commented 2 years ago

Hi

package version: 0.4.0

In my project, i have included the admin ui via my package.json. Now i migrated to another development machine and my project fails to build. I noticed the following in my package-lock.json

    "node_modules/@socket.io/admin-ui": {
       "version": "0.4.0",
       "resolved": "https://registry.npmjs.org/@socket.io/admin-ui/-/admin-ui-0.4.0.tgz",
       "integrity": "sha512-ZidOoJdlqtL0cP/fdD0KygoobJty/eVKGGtlPff/oZpyskEMvFXZbOhV1e4aQamRptO6l0/qG+TWCCXmXRtG5A==",
       "dependencies": {
          "@types/bcrypt": "~3.0.0",
          "bcrypt": "~5.0.1",
          "debug": "~4.3.1"
       },
       "peerDependencies": {
          "socket.io": ">=3.1.0"
       }
    },

Then i found this thread regarding bcrypt.js https://github.com/dcodeIO/bcrypt.js/issues/112

For my project to build, i had to globally install npm i -g node-gyp and then after removing everything in node_modules do an npm install

Maybe its best to include node-gyp in your depencies or switch to bcryptjs, which (according to the docs) is plain js instead of a native build and doesn't require node-gyp

Best, Thomas

darrachequesne commented 1 year ago

That's a great idea!

Implemented in https://github.com/socketio/socket.io-admin-ui/commit/81af1d40ae91b6f83e45b505a609b7ec25a75115, and included in v0.5.0.

Thanks :+1: