从今天开始,verdaccio (v3.8.3) 停止在本地注册表中显示包。
在浏览器上打开显示此消息:尚未发布包
配置中指定的存储文件夹(~/.local/share/verdaccio/storage)包含我所有的包。
但是数据库文件是空的~/.local/share/verdaccio/storage/.sinopia-db.json。确实从终端运行 verdaccio 我得到了这个:
warn --- config file - /home/bssadmin/.config/verdaccio/config.yaml
error--- Package database file corrupted (invalid JSON), please check the error printed below.
File Path: /home/bssadmin/.local/share/verdaccio/storage/.sinopia-db.json SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at LocalDatabase._parseDatabase (/home/bssadmin/.npm-packages/lib/node_modules/verdaccio/node_modules/@verdaccio/local-storage/lib/local-database.js:298:19)
at LocalDatabase._fetchLocalPackages (/home/bssadmin/.npm-packages/lib/node_modules/verdaccio/node_modules/@verdaccio/local-storage/lib/local-database.js:272:23)
at new LocalDatabase (/home/bssadmin/.npm-packages/lib/node_modules/verdaccio/node_modules/@verdaccio/local-storage/lib/local-database.js:49:22)
at LocalStorage._loadStorage (/home/bssadmin/.npm-packages/lib/node_modules/verdaccio/build/lib/local-storage.js:809:14)
at new LocalStorage (/home/bssadmin/.npm-packages/lib/node_modules/verdaccio/build/lib/local-storage.js:54:27)
at Storage.init (/home/bssadmin/.npm-packages/lib/node_modules/verdaccio/build/lib/storage.js:64:25)
at /home/bssadmin/.npm-packages/lib/node_modules/verdaccio/build/api/index.js:145:19
at Generator.next (<anonymous>)
at step (/home/bssadmin/.npm-packages/lib/node_modules/verdaccio/build/api/index.js:53:191)
error--- Database is locked, please check error message printed during startup to prevent data loss.
(node:9242) ExperimentalWarning: The fs.promises API is experimental
error--- Database is locked, please check error message printed during startup to prevent data loss.
warn --- Plugin successfully loaded: htpasswd
warn --- Plugin successfully loaded: audit
warn --- http address - http://0.0.0.0:4873/ - verdaccio/3.8.3
发生了什么?我该如何解决?
我应该用“verdaccio”标签标记这个问题,但它不可用,我无法创建它。