Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DepsCalculator: Cannot read property 'getText' of undefined #1303

Closed
dherges opened this issue Apr 28, 2019 · 2 comments · Fixed by #1311
Closed

DepsCalculator: Cannot read property 'getText' of undefined #1303

dherges opened this issue Apr 28, 2019 · 2 comments · Fixed by #1311
Labels

Comments

@dherges
Copy link
Contributor

dherges commented Apr 28, 2019

Expected Behavior

No build failure. DepsCalculator considers optional property moduleSpecififer in ExportDeclaration

Current Behavior

$ node_modules/.bin/nx affected:test <..>
Cannot read property 'getText' of undefined

Caused by:

export { ButtonModule };

Seems to be a ExportDeclaration w/o a moduleSpecififer. See the TypeScript API: moduleSpecifier is an optional property.

Failure Information (for bugs)

DepsCalculator#processFile was changed from 7.7.2 to 7.8.0 in 3cf84ec

Guessing: correct if conditition is

if (ts.isImportDeclaration(node) || (ts.isExportDeclaration(node) && node.moduleSpecifier)) {
 /* ... add deps ... */
}

NX Version: 7.8.3

$ ng --version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 7.3.8
Node: 11.14.0
OS: darwin x64
Angular: 7.2.14
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.13.8
@angular-devkit/build-angular      0.13.8
@angular-devkit/build-ng-packagr   0.13.8
@angular-devkit/build-optimizer    0.13.8
@angular-devkit/build-webpack      0.13.8
@angular-devkit/core               7.3.8
@angular-devkit/schematics         7.3.1
@angular/cdk                       7.3.7
@angular/cli                       7.3.8
@ngtools/json-schema               1.1.0
@ngtools/webpack                   7.3.8
@schematics/angular                7.3.8
@schematics/update                 0.13.8
ng-packagr                         5.1.0
rxjs                               6.3.3
typescript                         3.2.4
webpack                            4.29.0

Steps to Reproduce

n/a

Context

n/a

Failure Logs

n/a

Other

n/a

@dherges
Copy link
Contributor Author

dherges commented Apr 30, 2019

Nx 7 bugfix: #1304
Nx 8 bugfix: #1311

dherges added a commit to dherges/nx that referenced this issue Apr 30, 2019
vsavkin pushed a commit that referenced this issue May 2, 2019
@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant