angularcommand-linecompodoc

compodoc: command not found


I installed the documentation tool "Compodoc" in my Angular application. First, I installed the tool globally and in my project

npm install -g @compodoc/compodoc
npm install --save-dev @compodoc/compodoc

I added the command to my package.json file in the "scripts" area with the following line

"compodoc": "./node_modules/.bin/compodoc -p src/tsconfig.app.json"

And it generated me the entire documentation files with this command :

npm run compodoc

Everything went good until I tried to run the command compodoc -s to see the documentation in my browser.

compodoc: command not found

Solution

  • Just run "./node_modules/.bin/compodoc -s"