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.

angular cli: AOT does not work

See original GitHub issue

I’m submitting a … (check one with “x”)

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here

Current behavior when using the angular cli and AOT than the following error appears:

ERROR in ENOENT: no such file or directory, open ‘D:\ccviews*******\src\main\ui\node_modules@swimlane\ngx-dnd\release\components\container\container.component.html’

ng build works ng build --aot leads to the error

Expected behavior ng build should work with as well as without aot

“dependencies”: { “@ angular/animations”: “4.1.2”, “@ angular/common”: “4.1.2”, “@ angular/compiler”: “4.1.2”, “@ angular/core”: “4.1.2”, “@ angular/forms”: “4.1.2”, “@ angular/http”: “4.1.2”, “@ angular/platform-browser”: “4.1.2”, “@ angular/platform-browser-dynamic”: “4.1.2”, “@ angular/router”: “4.1.2”, “@ ng-bootstrap/ng-bootstrap”: “1.0.0-alpha.25”, “@swimlane/ngx-datatable”: “9.1.0”, “@swimlane/ngx-dnd”: “2.1.2”, “core-js”: “2.4.1”, “dragula”: “3.7.2”, “file-saver”: “1.3.3”, “ng2-dragula”: “1.3.1”, “rxjs”: “5.4.0”, “zone.js”: “0.8.10” }, “devDependencies”: { “@ angular/cli”: “1.0.3”, “@ angular/compiler-cli”: “4.1.2”, “@ types/jasmine”: “2.5.38”, “@ types/node”: “~6.0.60”, “@ types/file-saver”: “^0.0.0”, “codelyzer”: “2.0.1”, “jasmine-core”: “~2.5.2”, “jasmine-spec-reporter”: “~3.2.0”, “karma”: “~1.4.1”, “karma-chrome-launcher”: “~2.0.0”, “karma-cli”: “~1.0.1”, “karma-jasmine”: “~1.1.0”, “karma-jasmine-html-reporter”: “^0.2.2”, “karma-coverage-istanbul-reporter”: “^0.2.0”, “protractor”: “~5.1.0”, “ts-node”: “~2.0.0”, “tslint”: “4.5.1”, “typescript”: “2.2.2” }

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mmoravcikcommented, Jun 26, 2017

Me neither, but had a quick look at the code and found this:

https://github.com/swimlane/ngx-dnd/blob/master/config/webpack.package.js#L77

commented out AOT code?

+ when I manually created some empty files as per screenshot, then ng build --prod has finished without errors…It seems to work when deployed…

screen shot 2017-06-26 at 18 27 25

0reactions
Hypercubedcommented, Aug 15, 2017

AoT should be working now with v3.0.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ahead-of-time (AOT) compilation - Angular
Factory functions must be exported, named functions. The AOT compiler does not support lambda expressions ("arrow functions") for factory functions.
Read more >
Angular app runs fine via "ng serve -aot" and "ng ... - GitHub
Running via ng build --aot --prod and the application won't render with the same console ... it seems that @angular/compiler-cli is using this...
Read more >
angular-cli: AoT compilation with ng serve by default
Is it possible to make that ng serve uses AoT by default and JIT is only used when --aot=false flag is passed?
Read more >
The Ahead-of-Time (AOT) compiler - Angular - w3resource
Ahead-of-Time (AOT), which compiles your app at build time. JIT compilation is the default when you run the ng build (build only) or...
Read more >
Angular and AOT - CODE Magazine
Don't worry, the Angular team is hard at work in making AOT almost as fast as JIT, even for dev purposes. With the...
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