Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Cannot read property 'user' of undefined #41

Closed
MattiasFestin opened this issue Apr 24, 2014 · 1 comment
Closed

Cannot read property 'user' of undefined #41

MattiasFestin opened this issue Apr 24, 2014 · 1 comment

Comments

@MattiasFestin
Copy link
Contributor

Can't generate api documentation. Running on node.js v0.11.11 on windows 8.1 x64.
Getting an error in worker_permission.js. The doc generation has worked on my machine with the same specs. It stopped working for some reason.
My user has full permission on the whole project folder

Output from the command:

$PS>apidoc -i .\src -t .\apidoc_template -o .\apidoc

apidoc: load parser: api, ./plugins/parser_api.js
apidoc: load parser: apidefineerrorstructure,     ./plugins/parser_api_define_error_structure.js
apidoc: load parser: apidefinepermission, ./plugins/parser_api_define_permission.js
apidoc: load parser: apidefinestructure, ./plugins/parser_api_define_structure.js
apidoc: load parser: apidefinesuccessstructure,     ./plugins/parser_api_define_success_structure.js
apidoc: load parser: apidescription, ./plugins/parser_api_description.js
apidoc: load parser: apierror, ./plugins/parser_api_error.js
apidoc: load parser: apierrorexample, ./plugins/parser_api_error_example.js
apidoc: load parser: apierrorstructure, ./plugins/parser_api_error_structure.js
apidoc: load parser: apierrortitle, ./plugins/parser_api_error_title.js
apidoc: load parser: apiexample, ./plugins/parser_api_example.js
apidoc: load parser: apigroup, ./plugins/parser_api_group.js
apidoc: load parser: apiinfo, ./plugins/parser_api_info.js
apidoc: load parser: apiinfoexample, ./plugins/parser_api_info_example.js
apidoc: load parser: apiinfotitle, ./plugins/parser_api_info_title.js
apidoc: load parser: apiname, ./plugins/parser_api_name.js
apidoc: load parser: apiparam, ./plugins/parser_api_param.js
apidoc: load parser: apiparamtitle, ./plugins/parser_api_param_title.js
apidoc: load parser: apipermission, ./plugins/parser_api_permission.js
apidoc: load parser: apistructure, ./plugins/parser_api_structure.js
apidoc: load parser: apisuccess, ./plugins/parser_api_success.js
apidoc: load parser: apisuccessexample, ./plugins/parser_api_success_example.js
apidoc: load parser: apisuccessstructure, ./plugins/parser_api_success_structure.js
apidoc: load parser: apisuccesstitle, ./plugins/parser_api_success_title.js
apidoc: load parser: apiversion, ./plugins/parser_api_version.js
apidoc: load worker: workererrorstructure, ./plugins/worker_error_structure.js
apidoc: load worker: workererrortitle, ./plugins/worker_error_title.js
apidoc: load worker: workerinfotitle, ./plugins/worker_info_title.js
apidoc: load worker: workerpermission, ./plugins/worker_permission.js
apidoc: load worker: workerstructure, ./plugins/worker_structure.js
apidoc: load worker: workerparamtitle, ./plugins/worker_param_title.js
apidoc: load worker: workersuccessstructure, ./plugins/worker_success_structure.js
apidoc: load worker: workersuccesstitle, ./plugins/worker_success_title.js
apidoc: load filter: apierror, ./plugins/filter_api_error.js
apidoc: load filter: apiinfo, ./plugins/filter_api_info.js
apidoc: load filter: apiparam, ./plugins/filter_api_param.js
apidoc: load filter: apisuccess, ./plugins/filter_api_success.js
apidoc: inspect file: src\main.js
apidoc: size: 1339
apidoc: inspect file: src\controller\authenticationController.js
apidoc: size: 5526
apidoc: count blocks: 3
apidoc: count elements in block 0: 14
apidoc: count elements in block 1: 13
apidoc: count elements in block 2: 14
apidoc: api found in block: 0
apidoc: api found in block: 1
apidoc: api found in block: 2
apidoc: parse file: src\controller\authenticationController.js
apidoc: inspect file: src\controller\eventController.js
apidoc: size: 3415
apidoc: count blocks: 2
apidoc: count elements in block 0: 15
apidoc: count elements in block 1: 15
apidoc: api found in block: 0
apidoc: api found in block: 1
apidoc: parse file: src\controller\eventController.js
apidoc: inspect file: src\service\db.js
apidoc: size: 788
apidoc: inspect file: src\service\fb.js
apidoc: size: 56
apidoc: TypeError: Cannot read property 'user' of undefined
at Object.postProcess     (C:\Users\Mattias\AppData\Roaming\npm\node_modules\apidoc\lib\plugins\worker_permission.js:72:37)
    at Worker.process     (C:\Users\Mattias\AppData\Roaming\npm\node_modules\apidoc\lib\worker.js:70:12)
    at main     (C:\Users\Mattias\AppData\Roaming\npm\node_modules\apidoc\lib\apidoc.js:318:11)
    at Object.<anonymous>     (C:\Users\Mattias\AppData\Roaming\npm\node_modules\apidoc\bin\apidoc:151:25)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:349:32)
    at Function.Module._load (module.js:305:12)
    at Function.Module.runMain (module.js:490:10)
    at startup (node.js:123:16)
apidoc: TypeError: Cannot read property 'user' of undefined
@MattiasFestin
Copy link
Contributor Author

Proposed solution via && object check in if statement. #42

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

No branches or pull requests

2 participants