Nativescript: 3.0 breaking changes exported member/name finding issues.

Created on 3 May 2017  路  5Comments  路  Source: NativeScript/NativeScript

I read the breaking changes notes and tried to follow them. This reduced issue but i still have some problems

node_modules/nativescript-angular/dom-adapter.d.ts(2,10): error TS2305: Module '"/home/zero/aTender2/node_modules/@angular/platform-browser/index"' has no exported member '傻DomAdapter'.

node_modules/nativescript-angular/platform.d.ts(3,23): error TS2305: Module '"/home/zero/aTender2/node_modules/@angular/core/index"' has no exported member 'InjectionToken'.

node_modules/nativescript-angular/platform.d.ts(3,58): error TS2305: Module '"/home/zero/aTender2/node_modules/@angular/core/index"' has no exported member 'MissingTranslationStrategy'.

node_modules/nativescript-drop-down/drop-down.d.ts(40,14): error TS2304: Cannot find name 'UILabel'.

node_modules/nativescript-drop-down/drop-down.d.ts(41,18): error TS2503: Cannot find namespace 'android'.

node_modules/tns-core-modules/tns-core-modules.d.ts(17,27): error TS2304: Cannot find name 'Headers'.
node_modules/tns-core-modules/tns-core-modules.d.ts(19,44): error TS2304: Cannot find name 'RequestInit'.
node_modules/tns-core-modules/tns-core-modules.d.ts(19,66): error TS2304: Cannot find name 'Response'.

As well as a failed to find ui/core/proxy I understand it has been removed but it not clear what is referring to it.

question

Most helpful comment

Some of the dependencies in your package.json has to be updated. Here's a list with the correct versions and reasons for each one:

  1. NativeScript 3.0 ships by default with Angular 4.0. This means that you need to update all packages from to the @angular scope (including @angular/router) to either ~4.0.0 or ~4.1.0. You also need to update the nativescript-angular plugin to 3.0.0 and zone.js to ^0.8.2

  2. NativeScript now supports typescript versions 2.2 and above.

  3. tns-platform-declarations was also published with version 3.0.0 for NativeScript 3.0

  4. nativescript-telerik-ui was published with version 2.0.0 for NativeScript 3.0

However, some of your plugins might not be compatible with NativeScript 3.0 yet. If you have any trouble with them, please open an issue in the plugin's repo. Write back if you have any other trouble upgrading your app!

All 5 comments

Hey @x00,

Please, send your package.json and tsconfig.ts. Also note that you no longer need to add a reference to tns-core-modules.d.ts (it used to be referenced in PROJECT_ROOT/references.d.ts).

{
    "compilerOptions": {
        "module": "commonjs",
        "target": "es6",
        "experimentalDecorators": true,
        "emitDecoratorMetadata": true,
        "noEmitHelpers": true,
        "noEmitOnError": false,
        "lib": ["es6", "dom"],
        "baseUrl": ".",
        "paths": {
            "*": [
            "./node_modules/tns-core-modules/*",
            "./node_modules/*"]
        }
    },
    "exclude": [
        "node_modules",
        "platforms",
        "**/*.aot.ts"
    ]
}
{
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "readme": "NativeScript Application",
  "repository": "<fill-your-repository-here>",
  "nativescript": {
    "id": "org.nativescript.xxx",
    "tns-android": {
      "version": "3.0.0"
    }
  },
  "dependencies": {
    "@angular/common": "^2.2.1",
    "@angular/compiler": "^2.2.1",
    "@angular/core": "^2.2.1",
    "@angular/forms": "^2.2.1",
    "@angular/http": "^2.2.1",
    "@angular/platform-browser": "^2.2.1",
    "@angular/platform-browser-dynamic": "^2.2.1",
    "@angular/router": "^3.2.1",
    "crypto": "0.0.3",
    "nativescript-angular": "^1.2.0",
    "nativescript-checkbox": "^1.2.6",
    "nativescript-couchbase": "^1.0.17",
    "nativescript-drop-down": "^1.5.1",
    "nativescript-floatingactionbutton": "^2.2.7",
    "nativescript-gradient": "^1.0.0",
    "nativescript-grid-view": "^1.4.2",
    "nativescript-statusbar": "^1.0.0",
    "nativescript-telerik-ui": "^1.5.1",
    "nativescript-theme-core": "^0.2.6",
    "reflect-metadata": "^0.1.9",
    "tns-core-modules": "^3.0.0",
    "ts-md5": "^1.2.0",
    "zone.js": "^0.7.2"
  },
  "devDependencies": {
    "babel-traverse": "6.21.0",
    "babel-types": "6.21.0",
    "babylon": "6.14.1",
    "lazy": "1.0.11",
    "nativescript-dev-typescript": "^0.3.2",
    "tns-platform-declarations": "^2.4.4",
    "typescript": "~2.0.10"
  }
}

Some of the dependencies in your package.json has to be updated. Here's a list with the correct versions and reasons for each one:

  1. NativeScript 3.0 ships by default with Angular 4.0. This means that you need to update all packages from to the @angular scope (including @angular/router) to either ~4.0.0 or ~4.1.0. You also need to update the nativescript-angular plugin to 3.0.0 and zone.js to ^0.8.2

  2. NativeScript now supports typescript versions 2.2 and above.

  3. tns-platform-declarations was also published with version 3.0.0 for NativeScript 3.0

  4. nativescript-telerik-ui was published with version 2.0.0 for NativeScript 3.0

However, some of your plugins might not be compatible with NativeScript 3.0 yet. If you have any trouble with them, please open an issue in the plugin's repo. Write back if you have any other trouble upgrading your app!

updated those and plugin though look like ui/core/proxy has stumped a number of plugins, will let them know.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yclau picture yclau  路  3Comments

minjunlan picture minjunlan  路  3Comments

dhanalakshmitawwa picture dhanalakshmitawwa  路  3Comments

NordlingDev picture NordlingDev  路  3Comments

kn9ts picture kn9ts  路  3Comments