Upgraded to TNS 4.1.0. Unable to build platforms. Error '--allowJS' is not set.
See original GitHub issueFrom @shivapersad on June 4, 2018 19:55
Did you verify this is a real problem by searching the NativeScript Forum and the other open issues in this repo? Yes
Which platform(s) does your issue occur on?
Both
"nativescript": {
"id": "org.ngccng.cngApp",
"tns-ios": {
"version": "4.1.0"
},
"tns-android": {
"version": "4.1.1"
}
},
"dependencies": {
"@angular/animations": "~4.1.0",
"@angular/common": "~4.1.0",
"@angular/compiler": "~4.1.0",
"@angular/core": "~4.1.0",
"@angular/forms": "~4.1.0",
"@angular/http": "~4.1.0",
"@angular/platform-browser": "~4.1.0",
"@angular/router": "~4.1.0",
"nativescript-angular": "~3.0.0",
"nativescript-drop-down": "3.1.3",
"nativescript-fancyalert": "^1.1.2",
"nativescript-iqkeyboardmanager": "^1.1.0",
"nativescript-mapbox": "2.4.0",
"nativescript-phone": "^1.3.1",
"nativescript-theme-core": "~1.0.2",
"reflect-metadata": "~0.1.8",
"rxjs": "~5.3.0",
"tns-core-modules": "^4.1.0",
"validator": "^6.2.1",
"zone.js": "~0.8.2"
},
"devDependencies": {
"babel-traverse": "^6.26.0",
"babel-types": "6.25.0",
"babylon": "6.17.4",
"lazy": "1.0.11",
"nativescript-dev-typescript": "~0.4.0",
"typescript": "~2.2.1"
}
}
I updated my version of TNS from 3.3.0 to 4.1.0. I removed my iOS and Android platforms. I ran “tns update” in the root folder which updated the application. When I run “tns build android” or “tns build ios” I get the following error message in my console:
node_modules/tns-core-modules/ui/styling/gradient.d.ts(7,25): error TS6143: Module ‘…/…/css/parser’ was resolved to ‘/Users/shivapersad/cngProject/cngApp/node_modules/tns-core-modules/css/parser.js’, but ‘–allowJs’ is not set.
TypeScript compiler failed with exit code 1**
I checked the file being displayed in the error message but I am not seeing the ‘–allowJs’ flag in the code. Any assistance is appreciated. Thanks.
Copied from original issue: NativeScript/NativeScript#5909
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
In my case I had some outdated dependencies, I just had to update typescript to
2.7.*
and it works normally@NickIliev I updated my package.json file with the dependencies above and my Nativescript project works fine. Thanks for your assistance in resolving my issue.