I am trying to document my Angular + Typescript application. I'm using Compodoc for that. I installed compodoc using npm by running the command
'npm install -g compodoc'. And added
"compodoc": "./node_modules/.bin/compodoc -p src/tsconfig.json"
in my scripts in package.json. When I run npm run compodoc I'm getting this error
PS D:\Moya Proj\VITMOBAPPHYD2016> npm run compodoc
[email protected] compodoc D:\Moya Proj\VITMOBAPPHYD2016 compodoc -p src/tsconfig.json
_
| |
___ ___ _ __ ___ _ __ ___ __| | ___ ___
/ __| / _ \ | '_ ` _ \ | '_ \ / _ \ / _` | / _ \ / __|
| (__ | (_) | | | | | | | | |_) | | (_) | | (_| | | (_) | | (__ 0.0.41
\___| \___/ |_| |_| |_| | .__/ \___/ \__,_| \___/ \___|
| |
|_|
[11:08:57] "tsconfig.json" file was not found in the current directory npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] compodoc: compodoc -p src/tsconfig.json
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] compodoc script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Shahid.tabrez\AppData\Roaming\npm-cache_logs\2018-06-15T05_38_57_267Z-debug.log
Should I add anything to my tsconfig.json Or is there anything wrong in what I've done. Thanks in advance.
compodoc -p ./tsconfig.jsoninstead, and it worked.