Closed huangyiman closed 2 weeks ago
首先,verdaccio的配置文件中加上了如下的配置: middlewares: downloads-count:
connectionString: "host=10.110.90.36 port=5432 dbname=verdaccio user=postgres password=postgres123" # (Optional) Automatically migrate the database. Uses the postgres-migrations package for handling migration. migrate: true
然后在工程中从verdaccio上下载私服上的包时报错,在工程中执行npm login --registry指向私服地址: Error: getaddrinfo ENOTFOUND base at /tools/node-v18.18.0-linux-x64-glibc-217/lib/node_modules/verdaccio-downloads-count/node_modules/pg-pool/index.js:45:11 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async DbManager.getConnection (/tools/node-v18.18.0-linux-x64-glibc-217/lib/node_modules/verdaccio-downloads-count/lib/dbManager.js:39:16) at async DbManager.migrateDb (/tools/node-v18.18.0-linux-x64-glibc-217/lib/node_modules/verdaccio-downloads-count/lib/dbManager.js:45:26) { errno: -3008, code: 'ENOTFOUND', syscall: 'getaddrinfo', hostname: 'base' } 感觉是用户的信息从postgreSql中去查找了,这个插件不是只能统计下载包的数量吗?我是哪里配错了吗?
首先,verdaccio的配置文件中加上了如下的配置: middlewares: downloads-count:
(Required) Connection string to the database. Standard Postgres connection string. Can also be set by VDC_DB_CONNECTION_STRING
然后在工程中从verdaccio上下载私服上的包时报错,在工程中执行npm login --registry指向私服地址: Error: getaddrinfo ENOTFOUND base at /tools/node-v18.18.0-linux-x64-glibc-217/lib/node_modules/verdaccio-downloads-count/node_modules/pg-pool/index.js:45:11 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async DbManager.getConnection (/tools/node-v18.18.0-linux-x64-glibc-217/lib/node_modules/verdaccio-downloads-count/lib/dbManager.js:39:16) at async DbManager.migrateDb (/tools/node-v18.18.0-linux-x64-glibc-217/lib/node_modules/verdaccio-downloads-count/lib/dbManager.js:45:26) { errno: -3008, code: 'ENOTFOUND', syscall: 'getaddrinfo', hostname: 'base' } 感觉是用户的信息从postgreSql中去查找了,这个插件不是只能统计下载包的数量吗?我是哪里配错了吗?