brandonxiang / protobuf-to-typescript

A converter from pb to typescript
https://pb.brandonxiang.top
MIT License
77 stars 15 forks source link

可以选择安装2.0.2不强制升级吗 #18

Closed zhuthesea closed 1 year ago

zhuthesea commented 1 year ago

可以选择安装2.0.2不强制升级吗

4.0.0安装后报错

pbts -v
node:internal/errors:478 ErrorCaptureStackTrace(err); ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'pkg-updater' imported from /usr/local/lib/node_modules/pbts/bin.js at new NodeError (node:internal/errors:387:5) at packageResolve (node:internal/modules/esm/resolve:852:9) at moduleResolve (node:internal/modules/esm/resolve:901:20) at defaultResolve (node:internal/modules/esm/resolve:1115:11) at nextResolve (node:internal/modules/esm/loader:163:28) at ESMLoader.resolve (node:internal/modules/esm/loader:837:30) at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18) at ModuleWrap. (node:internal/modules/esm/module_job:76:40) at link (node:internal/modules/esm/module_job:75:36) { code: 'ERR_MODULE_NOT_FOUND' }

现在是npm i pbts@2.0.2 -g 然后手动修改 /usr/local/lib/node_modules/pbts/package.json 为4.0.0 绕过强制升级才可以正常使用。