question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[v1] tsickle crashes during build: `TypeError: node.getFullStart is not a function`

See original GitHub issue

Type of Issue

[x] Bug Report
[ ] Feature Request

Description

Trying to setup ng-packagr on ngx-datatable, when i run the build I get the following errors.

> ng-packagr -p ng-package.json

Building Angular library
Generating bundle for @swimlane/ngx-datatable
Cleaning bundle build directory
Processing assets
Running ngc

BUILD ERROR
node.getFullStart is not a function
TypeError: node.getFullStart is not a function
    at Annotator.Rewriter.writeNode (/Users/austin/dev/ngx-datatable/node_modules/@angular/tsc-wrapped/node_modules/tsickle/build/src/rewriter.js:70:24)
    at Annotator.Rewriter.visit (/Users/austin/dev/ngx-datatable/node_modules/@angular/tsc-wrapped/node_modules/tsickle/build/src/rewriter.js:53:18)
    at Annotator.maybeProcessEnum (/Users/austin/dev/ngx-datatable/node_modules/@angular/tsc-wrapped/node_modules/tsickle/build/src/tsickle.js:1188:22)
    at Annotator.maybeProcess (/Users/austin/dev/ngx-datatable/node_modules/@angular/tsc-wrapped/node_modules/tsickle/build/src/tsickle.js:676:29)
    at Annotator.Rewriter.visit (/Users/austin/dev/ngx-datatable/node_modules/@angular/tsc-wrapped/node_modules/tsickle/build/src/rewriter.js:52:19)
    at /Users/austin/dev/ngx-datatable/node_modules/@angular/tsc-wrapped/node_modules/tsickle/build/src/rewriter.js:84:19
    at visitEachNode (/Users/austin/dev/ngx-datatable/node_modules/typescript/lib/typescript.js:15956:30)
    at Object.forEachChild (/Users/austin/dev/ngx-datatable/node_modules/typescript/lib/typescript.js:16136:24)
    at Annotator.Rewriter.writeNode (/Users/austin/dev/ngx-datatable/node_modules/@angular/tsc-wrapped/node_modules/tsickle/build/src/rewriter.js:82:12)
    at Annotator.Rewriter.visit (/Users/austin/dev/ngx-datatable/node_modules/@angular/tsc-wrapped/node_modules/tsickle/build/src/rewriter.js:53:18)

How To Reproduce

Expected Behaviour

No errors

Version Information

ng-packagr: latest
node: v8
@angular: v5
"zone.js": "^0.8.18"
"rxjs": "^5.0.0"

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:19 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
jscharettcommented, Jul 27, 2018

What’s preventing this from being fixed? According to tsickle, they are just throwing warnings not errors, so why is this lib converting them to errors? This is an annoying problem considering it involves comments preventing the package being built.

6reactions
Lexaniuscommented, Dec 13, 2017

So i found a solution, its seems to be a dirty hack: I changed shouldIgnoreWarningsForPath: (filePath) => false, to shouldIgnoreWarningsForPath: (filePath) => true, in https://github.com/dherges/ng-packagr/blob/f895782e1f2fc6c954880cbb99567546d9d7a139/src/lib/util/ngc-patches.ts#L36

The better way is to write a custom function in https://github.com/dherges/ng-packagr/blob/f895782e1f2fc6c954880cbb99567546d9d7a139/src/lib/steps/ngc.ts#L227

Read more comments on GitHub >

github_iconTop Results From Across the Web

[v1] tsickle crashes during build: `TypeError: node.getFullStart is not ...
[v1] tsickle crashes during build: `TypeError: node.getFullStart is not a function`
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found