Deploy Verdaccio on Google cloud

I want to deploy Verdaccio on App Engine with a storage on Google cloud.

I manage to start the application on App Engine but i have an error about datastore access. I don't know how to fix it and the documentation is not clear about that.

Can you help me please?

Log on my local computer:

./node_modules/.bin/verdaccio --config ./config.yaml

 warn --- config file  - /home/workspace/verdaccio/config.yaml
 warn --- Using credentials in a file might be un-secure and is only recommended for local development
 warn --- Google storage settings: {"projectId":"myproject","keyFilename":"./keyFile.json"}
 warn --- Plugin successfully loaded: verdaccio-google-cloud
 warn --- gcloud: [datastore getSecret] init error InternalServerError: 7 PERMISSION_DENIED: Missing or insufficient permissions.

fatal--- uncaught exception, please report this
ServiceUnavailableError: [getSecret] permissions error

The user is owner of Cloud Datastore and administrator of the bucket (sorry it is in french) :

  • Administrateur des objets de l'espace de stockage
  • Créateur des objets de l'espace de stockage
  • Éditeur Pub/Sub
  • Lecteur de données BigQuery
  • Lecteur Secret Manager
  • Propriétaire Cloud Datastore
  • Utilisateur de tâche BigQuery

Log on GCP: enter image description here

—————————————————————————————————————————— Here is my files : config.yaml (config Verdaccio)

store:
  google-cloud:
   projectId: <Google Project ID>
   kind: npm1234
   bucket: verdaccio-bucket
   resumable: true
   keyFilename: ./userKey.json
uplinks:
  npmjs:
    url: https://registry.npmjs.org/
packages:
  "@myRepository/*":
    access: $authenticated
    publish: $authenticated
  "**":
    access: $authenticated
    publish: $authenticated
    proxy: npmjs
logs: { type: stdout, format: pretty, level: http }
auth:
  htpasswd:
    file: ./htpasswd
    max_users: -1
    algorithm: bcrypt
web:
  enable: false
  title: Verdaccio-UI
  darkMode: true
  scope: "@myRepository/*"
i18n:
  web: fr-FR

Package.json:

...
  "scripts": {
    "deploy": "gcloud app deploy app.yaml",
    "start": "./node_modules/.bin/verdaccio --config ./config.yaml --listen $PORT"
  },
  "dependencies": {
    "verdaccio": "^5.2.2",
    "verdaccio-google-cloud": "^10.0.2",
    "verdaccio-htpasswd": "^10.0.1"
  }
...

Solution 1:

I found the issue. In datastore I had no entity. I created one and it's working now. The plugin documentation was not clear about how to start with datastore :( .