我的 Ionic 应用程序中有cordova-plugin-camera@4.0.3并且在尝试使用该命令 git commit
生成自己的文档时出现错误,它阻止我运行。jsdoc2md
$ git commit -m "x"
> cordova-plugin-camera@4.0.3 precommit /plugins/cordova-plugin-camera
> npm run gen-docs && git add README.md
> cordova-plugin-camera@4.0.3 gen-docs /plugins/cordova-plugin-camera
> jsdoc2md --template "jsdoc2md/TEMPLATE.md" "www/**/*.js" --plugin "dmd-plugin-cordova-plugin" > README.md
sh: jsdoc2md: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! cordova-plugin-camera@4.0.3 gen-docs: `jsdoc2md --template "jsdoc2md/TEMPLATE.md" "www/**/*.js" --plugin "dmd-plugin-cordova-plugin" > README.md`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the cordova-plugin-camera@4.0.3 gen-docs script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jeremylopez/.npm/_logs/2018-10-04T15_25_27_086Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cordova-plugin-camera@4.0.3 precommit: `npm run gen-docs && git add README.md`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cordova-plugin-camera@4.0.3 precommit script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /.npm/_logs/2018-10-04T15_25_27_107Z-debug.log
husky - pre-commit hook failed (add --no-verify to bypass)
知道如何克服这个错误吗?该应用程序是在云中构建的,因此我对包所做的任何本地更改都无济于事。