compodoc / compodoc

:notebook_with_decorative_cover: The missing documentation tool for your Angular, Nest & Stencil application
https://compodoc.app
MIT License
4k stars 401 forks source link

[BUG] #1156

Closed gkit1980 closed 2 years ago

gkit1980 commented 2 years ago

Hello, I have already make the installation of compodoc and I'm trying to run the command npx compodoc -p angular/tsconfig.doc.json but I'm taking the error 'Cannot read property 'name' of undefined' Could you help me?

versions

node 8.12.0 Angular 7 npm 6.4.1

The compodoc is installed globally Debug.log info:

0 info it worked if it ends with ok 1 verbose cli [ 'C:\Program Files\nodejs\node.exe', 1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'compodoc:serve' ] 2 info using npm@6.4.1 3 info using node@v8.12.0 4 verbose run-script [ 'precompodoc:serve', 'compodoc:serve', 'postcompodoc:serve' ] 5 info lifecycle @impeo/ice-playground@0.0.1~precompodoc:serve: @impeo/ice-playground@0.0.1 6 info lifecycle @impeo/ice-playground@0.0.1~compodoc:serve: @impeo/ice-playground@0.0.1 7 verbose lifecycle @impeo/ice-playground@0.0.1~compodoc:serve: unsafe-perm in lifecycle true 8 verbose lifecycle @impeo/ice-playground@0.0.1~compodoc:serve: PATH: C:\Users\sa151lj\AppData\Roaming\nvm\v8.12.0\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\sa151lj\source\repos\customer-area-src\ice-playground\node_modules.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\AdoptOpenJDK\jdk-11.0.10.9-hotspot\bin;C:\Program Files\Java\jdk1.8.0_241\bin;C:\Python27\;C:\Python27\Scripts;C:\ProgramData\Boxstarter;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Git\cmd;C:\ProgramData\chocolatey\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Riverbed\Steelhead Mobile\;C:\Program Files (x86)\Brackets\command;C:\Users\sa151lj\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\oracle\instantclient_19_6;;C:\Program Files\1E\Client\Extensibility\NomadBranch;C:\Program Files\nodejs\;C:\Program Files (x86)\Common Files\Hitachi ID\;C:\Program Files\Common Files\Hitachi ID\;C:\Program Files\TortoiseGit\bin;C:\Users\sa151lj\AppData\Local\Microsoft\WindowsApps;C:\Users\sa151lj\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\sa151lj\AppData\Local\Programs\Fiddler;C:\Users\sa151lj.dotnet\tools;C:\Users\sa151lj\AppData\Local\GitHubDesktop\bin;C:\ProgramData\SA151LJ\GitHubDesktop\bin;C:\Users\sa151lj\AppData\Local\Microsoft\WindowsApps;C:\Users\sa151lj\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Users\sa151lj\AppData\Roaming\npm 9 verbose lifecycle @impeo/ice-playground@0.0.1~compodoc:serve: CWD: C:\Users\sa151lj\source\repos\customer-area-src\ice-playground 10 silly lifecycle @impeo/ice-playground@0.0.1~compodoc:serve: Args: [ '/d /s /c', 'npx compodoc -s' ] 11 silly lifecycle @impeo/ice-playground@0.0.1~compodoc:serve: Returned: code: 1 signal: null 12 info lifecycle @impeo/ice-playground@0.0.1~compodoc:serve: Failed to exec compodoc:serve script 13 verbose stack Error: @impeo/ice-playground@0.0.1 compodoc:serve: npx compodoc -s 13 verbose stack Exit status 1 13 verbose stack at EventEmitter. (C:\Users\sa151lj\AppData\Roaming\nvm\v8.12.0\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16) 13 verbose stack at emitTwo (events.js:126:13) 13 verbose stack at EventEmitter.emit (events.js:214:7) 13 verbose stack at ChildProcess. (C:\Users\sa151lj\AppData\Roaming\nvm\v8.12.0\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 13 verbose stack at emitTwo (events.js:126:13) 13 verbose stack at ChildProcess.emit (events.js:214:7) 13 verbose stack at maybeClose (internal/child_process.js:915:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) 14 verbose pkgid @impeo/ice-playground@0.0.1 15 verbose cwd C:\Users\sa151lj\source\repos\customer-area-src\ice-playground 16 verbose Windows_NT 10.0.18363 17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "compodoc:serve" 18 verbose node v8.12.0 19 verbose npm v6.4.1 20 error code ELIFECYCLE 21 error errno 1 22 error @impeo/ice-playground@0.0.1 compodoc:serve: npx compodoc -s 22 error Exit status 1 23 error Failed at the @impeo/ice-playground@0.0.1 compodoc:serve script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

vogloblinsky commented 2 years ago

Could you try ./node_modules/.bin/compodoc -p angular/tsconfig.doc.json

gkit1980 commented 2 years ago

Thanks for the quick response but i take this error now:

C:\Users\sa151lj\source\repos\customer-area-src\ice-playground>cd ../node_modules/.bin && compodoc -p angular/tsconfig.doc.json C:\Users\sa151lj\source\repos\customer-area-src\node_modules\@compodoc\ngd-transformer\node_modules\fs-extra\lib\mkdirs\make-dir.js:85 } catch { ^

SyntaxError: Unexpected token { at createScript (vm.js:80:10) at Object.runInThisContext (vm.js:139:10) at Module._compile (module.js:617:28) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Module.require (module.js:597:17) at require (internal/module.js:11:18) at Object. (C:\Users\sa151lj\source\repos\customer-area-src\node_modules\@compodoc\ngd-transformer\node_modules\fs-extra\lib\mkdirs\index.js:3:44)

I would appreciate if you can help me!!!

vogloblinsky commented 2 years ago

Node.js 8 is not supported, could you do the test with Node.js > 12 ?

gkit1980 commented 2 years ago

For now , i can't upgrade Node 8 to 12....is there any other version of Compodoc that is compatible with Node 8?

vogloblinsky commented 2 years ago

1.1.11

gkit1980 commented 2 years ago

I installed 1.1.11 and i took this kind of error

C:\Users\sa151lj\source\repos\customer-area-src\ice-playground>npm run compodoc:gen

@impeo/ice-playground@0.0.1 compodoc:gen C:\Users\sa151lj\source\repos\customer-area-src\ice-playground npx compodoc -p angular/tsconfig.doc.json

Unexpected token { npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @impeo/ice-playground@0.0.1 compodoc:gen: npx compodoc -p angular/tsconfig.doc.json npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @impeo/ice-playground@0.0.1 compodoc:gen 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\sa151lj\AppData\Roaming\npm-cache_logs\2021-11-27T17_32_02_847Z-debug.log

Then I run the cmd you mentioned previously but I had the same results

C:\Users\sa151lj\source\repos\customer-area-src\ice-playground>cd ../node_modules/.bin && compodoc -p angular/tsconfig.doc.json C:\Users\sa151lj\source\repos\customer-area-src\node_modules\@compodoc\ngd-transformer\node_modules\fs-extra\lib\mkdirs\make-dir.js:85 } catch { ^

SyntaxError: Unexpected token { at createScript (vm.js:80:10) at Object.runInThisContext (vm.js:139:10) at Module._compile (module.js:617:28) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Module.require (module.js:597:17) at require (internal/module.js:11:18) at Object. (C:\Users\sa151lj\source\repos\customer-area-src\node_modules\@compodoc\ngd-transformer\node_modules\fs-extra\lib\mkdirs\index.js:3:44)

Any suggestion?...need I smaller version of compodoc?

vogloblinsky commented 2 years ago

What is the structure of your project ? folders ? etc... it seems to be a monorepo ? Can you do a clean install of you npm dependencies, rm -rf node_modules + npm i

vogloblinsky commented 2 years ago

Any news ?

gkit1980 commented 2 years ago

I produced the documentation for Node version 12 but I'm still facing issues with Node 8.12 I haven't made a clean install of npm dependencies. I will do it and I response you asap.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically closed because it has not had recent activity. Please file a new issue if you are encountering a similar or related problem. Thank you for your contributions.