Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

local installation can not load 'verdaccio-google-cloud' plugin #1404

Closed
fiws opened this issue Jul 26, 2019 · 4 comments
Closed

local installation can not load 'verdaccio-google-cloud' plugin #1404

fiws opened this issue Jul 26, 2019 · 4 comments

Comments

@fiws
Copy link

fiws commented Jul 26, 2019

Describe the bug

The plugin loader of verdaccio 4 does not want to load the verdaccio-google-cloud plugin when installed locally (not globally). Instead it crashes.

We are using app engine to deploy verdaccio, so we can not install it globally. This issue is preventing us from upgrading to 4.x

To Reproduce

I reproduced this with a minimal setup here: https://github.com/hydra-newmedia/verdaccio-issue-1404

To test it:

  1. clone the repo
  2. run npm install
  3. run npm start

Configuration File (cat ~/.config/verdaccio/config.yaml)

store:
  google-cloud:
   ## google project id
   projectId: test

   ## namespace for metadata database
   kind: verdaccioMetadata

   ## this pluging do not create the bucket, it has to exist
   bucket: test

   ## google cloud recomend this file only for development
   ## this field is not mandatory
   keyFilename: ./service-account.json

Environment information

Environment Info:

System:
OS: Linux 5.2 Arch Linux undefined
CPU: (12) x64 Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz
Binaries:
Node: 11.15.0 - /usr/bin/node
Yarn: 1.17.3 - /usr/bin/yarn
npm: 6.10.2 - /usr/bin/npm
Virtualization:
Docker: 18.09.8 - /usr/bin/docker
Browsers:
Firefox: 68.0.1

This is my machine, not the app engine env. But i can reproduce it here.

Debugging output

verdaccio crashes with

❯ ./node_modules/.bin/verdaccio --config ./config.yaml
 warn --- config file  - /tmp/broken-verdaccio/config.yaml
 error--- plugin not found. try npm install verdaccio-google-cloud
(node:9535) UnhandledPromiseRejectionWarning: Error: 
        verdaccio-google-cloud plugin not found. try "npm install verdaccio-google-cloud"
    at Object.keys.map.pluginId (/tmp/broken-verdaccio/node_modules/verdaccio/build/lib/plugin-loader.js:113:13)
    at Array.map (<anonymous>)
    at loadPlugin (/tmp/broken-verdaccio/node_modules/verdaccio/build/lib/plugin-loader.js:66:37)
    at LocalStorage._loadStorePlugin (/tmp/broken-verdaccio/node_modules/verdaccio/build/lib/local-storage.js:827:59)
    at LocalStorage._loadStorage (/tmp/broken-verdaccio/node_modules/verdaccio/build/lib/local-storage.js:812:26)
    at new LocalStorage (/tmp/broken-verdaccio/node_modules/verdaccio/build/lib/local-storage.js:47:27)
    at Storage.init (/tmp/broken-verdaccio/node_modules/verdaccio/build/lib/storage.js:61:25)
    at _default (/tmp/broken-verdaccio/node_modules/verdaccio/build/api/index.js:130:17)
    at startVerdaccio (/tmp/broken-verdaccio/node_modules/verdaccio/build/lib/bootstrap.js:50:22)
    at init (/tmp/broken-verdaccio/node_modules/verdaccio/build/lib/cli.js:76:35)
(node:9535) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:9535) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@fiws
Copy link
Author

fiws commented Aug 6, 2019

anything i can do the speed up the "issue verification"? I already provided a minimal setup reproduction here: https://github.com/hydra-newmedia/verdaccio-issue-1404

@juanpicado
Copy link
Member

cc: @verdaccio/collaborators

@fiws
Copy link
Author

fiws commented Aug 14, 2019

This problem might be related to the verdaccio-google-cloud plugin. I also get the same error when trying to install everything globally. (in a node docker container)

@jodem
Copy link

jodem commented Sep 18, 2019

I had the same problem with a custom module and I can confirm that an invalid plugin will display the same error message as if the plugin was not present.

@verdaccio verdaccio locked and limited conversation to collaborators Feb 5, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

3 participants