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.

Upgraded to TNS 4.1.0. Unable to build platforms. Error '--allowJS' is not set.

See original GitHub issue

From @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:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
arielnmzcommented, Jun 5, 2018

In my case I had some outdated dependencies, I just had to update typescript to 2.7.* and it works normally

2reactions
shivapersadcommented, Jun 5, 2018

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgraded to TNS 4.1.0. Unable to build platforms. Error ...
js', but '--allowJs' is not set. ... I checked the file being displayed in the error message but I am not seeing the...
Read more >
How to solveTS6143: '--allowJs' is not set - Stack Overflow
It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced ...
Read more >
tns-platform-declarations | Yarn - Package Manager
This plugin contains type information about the native platforms as exposed by the NativeScript framework. Offically supported entry points:.
Read more >
TSConfig Reference - Docs on every TSConfig option
From allowJs to useDefineForClassFields the TSConfig reference includes information about all of the active compiler flags setting up a TypeScript project.
Read more >
Download Patch File - OpenDev
In order to serve the zuul dashboard code from an external static location, -``REACT_APP_ZUUl_API`` must be set at javascript build time: +``ZUUL_API_URL`` ...
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