Closed hellodpk closed 6 years ago
@hellodpk My sincere apologies for such late reply (and leaving you hang out with issue)! The source code of fast-sort library is actually contained in https://github.com/snovakovic/js-flock repository. It's just imported in here as a single module. so I missed this issue
I have tried latest version 1.2.8
of fast-sort
with latest version of angular cli and everything is working fine on my end. Do you still experience issues? can you try to bump up version of fast-sort
and try it again. If that does not work I will do deeper investigation of the issue.
I tried but no luck. I am adding all dependencies
"dependencies": { "@angular/animations": "^4.3.0", "@angular/common": "^4.3.0", "@angular/compiler": "^4.3.0", "@angular/core": "^4.3.0", "@angular/forms": "^4.3.0", "@angular/http": "^4.3.0", "@angular/platform-browser": "^4.3.0", "@angular/platform-browser-dynamic": "^4.3.0", "@angular/platform-server": "^4.3.0", "@angular/router": "^4.3.0", "@angular/upgrade": "4.1.3", "angular-calendar": "0.17.1", "angular-datatables": "^4.2.0", "angular2-datatable": "0.6.0", "angular2-highcharts": "^0.5.5", "angular2-ladda": "1.2.1", "angular2-text-mask": "8.0.1", "angular2-toaster": "4.0.0", "angular2-virtual-scroll": "^0.3.1", "chart.js": "2.6.0", "core-js": "2.4.1", "datatables.net-bs4": "^1.10.16", "datatables.net-select-bs4": "^1.2.4", "dragula": "3.7.2", "fast-sort": "^1.2.8", "jquery": "^3.2.1", "moment": "^2.20.1", "ng2-charts": "1.6.0", "ng2-date-picker": "^2.8.1", "ng2-dragula": "1.5.0", "ng2-ion-range-slider": "^1.0.3", "ng2-select": "1.2.0", "ng2-validation": "^4.2.0", "ngx-bootstrap": "^2.0.3", "ngx-cookie-service": "^1.0.9", "ngx-loading": "^1.0.9", "ngx-order-pipe": "^1.1.1", "ngx-pagination": "^3.0.3", "ngx-papaparse": "^1.2.5", "ngx-progressbar": "^2.1.1", "ngx-treeview": "^1.0.10", "nouislider": "^10.1.0", "rxjs": "5.4.3", "ts-helpers": "1.1.2", "zone.js": "0.8.12" }, "devDependencies": { "@angular/cli": "1.7.3", "@angular/compiler-cli": "^4.2.4", "@types/datatables.net": "^1.10.8", "@types/jasmine": "2.5.51", "@types/jquery": "^3.2.17", "@types/node": "7.0.29", "codelyzer": "3.0.1", "jasmine-core": "2.6.3", "jasmine-spec-reporter": "4.1.0", "karma": "1.7.0", "karma-chrome-launcher": "2.1.1", "karma-cli": "1.0.1", "karma-coverage-istanbul-reporter": "1.3.0", "karma-jasmine": "1.1.0", "karma-jasmine-html-reporter": "0.2.2", "protractor": "5.1.2", "ts-node": "3.0.6", "tslint": "5.4.3", "typescript": "2.3.4" }
this configuration works well.
"dependencies": { "@angular/animations": "^4.3.0", "@angular/common": "^4.3.0", "@angular/compiler": "^4.3.0", "@angular/core": "^4.3.0", "@angular/forms": "^4.3.0", "@angular/http": "^4.3.0", "@angular/platform-browser": "^4.3.0", "@angular/platform-browser-dynamic": "^4.3.0", "@angular/platform-server": "^4.3.0", "@angular/router": "^4.3.0", "@angular/upgrade": "4.1.3", "angular-calendar": "0.17.1", "angular-datatables": "^4.2.0", "angular2-datatable": "0.6.0", "angular2-highcharts": "^0.5.5", "angular2-ladda": "1.2.1", "angular2-text-mask": "8.0.1", "angular2-toaster": "4.0.0", "angular2-virtual-scroll": "^0.3.1", "chart.js": "2.6.0", "core-js": "2.4.1", "datatables.net-bs4": "^1.10.16", "datatables.net-select-bs4": "^1.2.4", "dragula": "3.7.2", "fast-sort": "^1.2.6", "jquery": "^3.2.1", "moment": "^2.20.1", "ng2-charts": "1.6.0", "ng2-date-picker": "^2.8.1", "ng2-dragula": "1.5.0", "ng2-ion-range-slider": "^1.0.3", "ng2-select": "1.2.0", "ng2-validation": "^4.2.0", "ngx-bootstrap": "^2.0.3", "ngx-cookie-service": "^1.0.9", "ngx-loading": "^1.0.9", "ngx-order-pipe": "^1.1.1", "ngx-pagination": "^3.0.3", "ngx-papaparse": "^1.2.5", "ngx-progressbar": "^2.1.1", "ngx-treeview": "^1.0.10", "nouislider": "^10.1.0", "rxjs": "5.4.3", "ts-helpers": "1.1.2", "zone.js": "0.8.12" }, "devDependencies": { "@angular/cli": "1.2.3", "@angular/compiler-cli": "^4.2.4", "@types/datatables.net": "^1.10.8", "@types/jasmine": "2.5.51", "@types/jquery": "^3.2.17", "@types/node": "7.0.29", "codelyzer": "3.0.1", "jasmine-core": "2.6.3", "jasmine-spec-reporter": "4.1.0", "karma": "1.7.0", "karma-chrome-launcher": "2.1.1", "karma-cli": "1.0.1", "karma-coverage-istanbul-reporter": "1.3.0", "karma-jasmine": "1.1.0", "karma-jasmine-html-reporter": "0.2.2", "protractor": "5.1.2", "ts-node": "3.0.6", "tslint": "5.4.3", "typescript": "2.3.4" }
@hellodpk Yes indeed I can reproduce it with angular cli 1.7.4
.
What have worked in my case is importing it as
import * as sort from 'fast-sort';
or as
const sort = require('fast-sort')
You can read on the similar issues on following links to find out more about it.
https://github.com/Microsoft/TypeScript/issues/5565 https://github.com/aurelia/skeleton-navigation/issues/606
Let me know if that solved your issue?
@snovakovic Thanks
import * as sort from 'fast-sort';
worked and solves my problem (I have to upgrade to 1.7.3 for creating production build now no need to downgrade) and it works in development phase.
Image.
I am struck with the issue
ERROR TypeError: fast_sort_1.default is not a function
This function was working correctly till angular cli version 1.2.6 but when i upgraded to version 1.7.4 , I am getting above error.
Please let me now If you need any additional information