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

issue facing when upgrading angular cli version 1.2.6 to 1.7.4 #1

Closed
hellodpk opened this issue Apr 10, 2018 · 5 comments
Closed

issue facing when upgrading angular cli version 1.2.6 to 1.7.4 #1

hellodpk opened this issue Apr 10, 2018 · 5 comments

Comments

@hellodpk
Copy link

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

@snovakovic
Copy link
Owner

snovakovic commented May 23, 2018

@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.

@hellodpk
Copy link
Author

hellodpk commented May 24, 2018

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" }

@hellodpk
Copy link
Author

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" }

@snovakovic
Copy link
Owner

@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.

microsoft/TypeScript#5565
aurelia/skeleton-navigation#606

Let me know if that solved your issue?

@hellodpk
Copy link
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants