Skip to content
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

执行npx pbjs -t json src/proto/*.proto > src/proto/proto.json这一步时,并没有生成相应的proto.json #68

Open
hzdavid opened this issue Dec 8, 2023 · 0 comments

Comments

@hzdavid
Copy link

hzdavid commented Dec 8, 2023

npx pbjs -t json src/proto/*.proto > src/proto/proto.json
npx: installed 3 in 3.694s

cat src/proto/proto.json
Usage: pbjs [options] <schema_path>

Options:
-V, --version output the version number
--es5 <js_path> Generate ES5 JavaScript code
--es6 <js_path> Generate ES6 JavaScript code
--ts <ts_path> Generate TypeScript code
--decode <msg_type> Decode standard input to JSON
--encode <msg_type> Encode standard input to JSON
-h, --help output usage information

生成的内容居然是上面的。不是json

protobufjs
bash: protobufjs: command not found
daviddeMacBook-Pro:vue-protobuf david$ pbjs
bash: pbjs: command not found

但是我protobufjs确实已经安装

ll node_modules/protobufjs
lrwxr-xr-x 1 david staff 47 Dec 8 09:41 node_modules/protobufjs -> .store/[email protected]/node_modules/protobufjs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant