Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error loading a plugin bitbucket - cannot find module bcrypt #32

Open
sators opened this issue Apr 27, 2020 · 2 comments
Open

error loading a plugin bitbucket - cannot find module bcrypt #32

sators opened this issue Apr 27, 2020 · 2 comments

Comments

@sators
Copy link

sators commented Apr 27, 2020

Upon a fresh install under Ubuntu 20 using npm install -g verdaccio-bitbucket and the default auth config, once launching verdaccio it fails with the following error:

 error--- error loading a plugin bitbucket: { Error: Cannot find module '/usr/local/lib/node_modules/verdaccio-bitbucket/node_modules/bcrypt/lib/binding/bcrypt_lib.node'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/verdaccio-bitbucket/node_modules/bcrypt/bcrypt.js:6:16)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3) code: 'MODULE_NOT_FOUND' }
 error--- verdaccio-bitbucket doesn't look like a valid plugin
(node:13010) UnhandledPromiseRejectionWarning: Error: sanity check has failed, "bitbucket" is not a valid plugin
    at Object.keys.map.pluginId (/usr/local/lib/node_modules/verdaccio/build/lib/plugin-loader.js:143:13)
    at Array.map (<anonymous>)
    at loadPlugin (/usr/local/lib/node_modules/verdaccio/build/lib/plugin-loader.js:62:37)
    at Auth._loadPlugin (/usr/local/lib/node_modules/verdaccio/build/lib/auth.js:54:38)
    at new Auth (/usr/local/lib/node_modules/verdaccio/build/lib/auth.js:44:25)
    at defineAPI (/usr/local/lib/node_modules/verdaccio/build/api/index.js:43:16)
    at _default (/usr/local/lib/node_modules/verdaccio/build/api/index.js:127:10)
    at process._tickCallback (internal/process/next_tick.js:68:7)
    at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
    at startup (internal/bootstrap/node.js:283:19)

This is resolved by:

$ sudo su -
$ cd /usr/local/lib/node_modules/verdaccio-bitbucket/node_modules
$ npm rebuild bcrypt

Then verdaccio successfully launches:

$ verdaccio
 warn --- config file  - /home/ubuntu/verdaccio/config.yaml
 warn --- Verdaccio started
 warn --- Plugin successfully loaded: verdaccio-bitbucket
 warn --- Plugin successfully loaded: verdaccio-audit
@sators
Copy link
Author

sators commented Apr 27, 2020

Possibly related to kelektiv/node.bcrypt.js#566

@sators
Copy link
Author

sators commented Jan 11, 2022

Issue still exists in v3.0.1

Holi0317 added a commit to Holi0317/verdaccio-bitbucket that referenced this issue Aug 13, 2022
This should eliminate problem related to building bcrypt package.
hash-wasm is distributing .wasm files and there is no compile step
required.

Close idangozlan#30, idangozlan#32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant