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.

Version: 1.5.0 Angular2 version 2.4.5 as well as 2.4.6 Angular cli version 1.0.0-beta.30 as well as 1.0.0-beta.26

During aot serve I get this error. Any ideas?

ERROR in ./~/ng2-nouislider/src/nouislider.ts
Module build failed: TypeError: Cannot read property 'text' of undefined
    at Object.getTokenPosOfNode (/Users/tibinko/Documents/work/mates/frontend2/migration-project/node_modules/typescript/lib/typescript.js:5687:71)
    at IdentifierObject.TokenOrIdentifierObject.getStart (/Users/tibinko/Documents/work/mates/frontend2/migration-project/node_modules/typescript/lib/typescript.js:53619:23)
    at IdentifierObject.TokenOrIdentifierObject.getText (/Users/tibinko/Documents/work/mates/frontend2/migration-project/node_modules/typescript/lib/typescript.js:53640:77)
    at /Users/tibinko/Documents/work/mates/frontend2/migration-project/node_modules/@ngtools/webpack/src/loader.js:119:42
    at Array.filter (native)
    at /Users/tibinko/Documents/work/mates/frontend2/migration-project/node_modules/@ngtools/webpack/src/loader.js:118:14
    at Array.forEach (native)
    at _removeDecorators (/Users/tibinko/Documents/work/mates/frontend2/migration-project/node_modules/@ngtools/webpack/src/loader.js:109:10)
    at /Users/tibinko/Documents/work/mates/frontend2/migration-project/node_modules/@ngtools/webpack/src/loader.js:282:48
 @ ./src/$$_gendir/app/modules/app.module.ngfactory.ts 42:0-58
 @ ./src/main.ts
 @ multi webpack-dev-server/client?http://localhost:4200/ ./src/main.ts

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:18 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
tbcommented, Feb 27, 2017
3reactions
stephanrauhcommented, Feb 27, 2017

A radical workaround is to use replace the library by the file https://github.com/tb/ng2-nouislider/blob/master/src/nouislider.ts. Just copy it somewhere in your source folder and remove the library from the packages.json until the bug has been fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Lazy Loaded Modules with AOT - TypeError: '' is not a function ...
My dist build, with AOT and Lazy Loaded modules works fine when served with npm packages webpack-dev-server or live-server; It is only when...
Read more >
Ahead-of-time (AOT) compilation - Angular
The Angular ahead-of-time (AOT) compiler converts your Angular HTML and TypeScript code into efficient JavaScript code during the build phase before the ...
Read more >
Error when build on AOT - Material Design for Bootstrap
Hello,I got this error when build AOT: ERROR in : TypeError: Cannot read property \'kind\' of undefinedat nodeCanBeDecorated ...
Read more >
Angular 2 : AOT TypeError: base64 is not a function-angular.js
[Solved]-Angular 2 : AOT TypeError: base64 is not a function-angular.js ... i found answer , its node js doing problem here , AOT...
Read more >
Cannot read property 'ngModuleByPipeOrDirective' of undefined
TypeError : Cannot read property 'ngModuleByPipeOrDirective' of undefined ... \node_modules@ionic\app-scripts\dist\aot\aot-compiler.js:32:23)
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