socket.io-admin-ui icon indicating copy to clipboard operation
socket.io-admin-ui copied to clipboard

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

Open Thomas-1985 opened this issue 3 years ago • 0 comments

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

Thomas-1985 avatar Jul 30 '22 08:07 Thomas-1985