Skip to content

NativeScript 6.2.0 compilation error #45

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

Closed
sashok1337 opened this issue Nov 6, 2019 · 2 comments
Closed

NativeScript 6.2.0 compilation error #45

sashok1337 opened this issue Nov 6, 2019 · 2 comments

Comments

@sashok1337
Copy link

sashok1337 commented Nov 6, 2019

After NativeScript&nativescript-angular update I can't compile project, error thrown:

Module not found: Error: Can't resolve 'nativescript-angular/forms/value-accessors/text-value-accessor' in '.../node_modules/nativescript-masked-text-field/angular'
 @ ../node_modules/nativescript-masked-text-field/angular/masked-text-value-accessor.js 5:28-101
 @ ../node_modules/nativescript-masked-text-field/angular/index.js
 @ ./app/app.module.ts
 @ ./main.ts

package.json

{
  "scripts": {
    "lint": "eslint '*/**/*.+(js|ts)'"
  },
  "nativescript": {
    "id": "com.....app",
    "android": {
      "v8Flags": "--expose_gc",
      "markingMode": "none"
    },
    "tns-android": {
      "version": "6.2.0"
    },
    "tns-ios": {
      "version": "6.2.0"
    }
  },
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "repository": "<fill-your-repository-here>",
  "dependencies": {
    "@angular/common": "^8.2.13",
    "@angular/compiler": "^8.2.13",
    "@angular/core": "^8.2.13",
    "@angular/forms": "^8.2.13",
    "@angular/http": "^8.0.0-beta.10",
    "@angular/platform-browser": "^8.2.13",
    "@angular/platform-browser-dynamic": "^8.2.13",
    "@angular/router": "^8.2.13",
    "@auth0/angular-jwt": "^3.0.1",
    "@ngrx/effects": "^8.4.0",
    "@ngrx/store": "^8.4.0",
    "nativescript-angular": "^8.20.0",
    "nativescript-barcodescanner": "^3.4.0",
    "nativescript-carousel": "^6.1.1",
    "nativescript-masked-text-field": "^4.0.3",
    "nativescript-sound": "^1.0.4",
    "nativescript-toasty": "^2.0.1",
    "nativescript-ui-listview": "^8.0.0",
    "nativescript-urlhandler": "^1.3.0",
    "nativescript-vibrate": "^2.1.3",
    "reflect-metadata": "^0.1.13",
    "rxjs": "^6.5.3",
    "tns-core-modules": "^6.2.0",
    "tns-platform-declarations": "^6.2.0",
    "zone.js": "^0.10.2"
  },
  "devDependencies": {
    "@angular/compiler-cli": "^8.2.13",
    "@nativescript/schematics": "^0.7.3",
    "@ngtools/webpack": "^8.3.17",
    "@typescript-eslint/eslint-plugin": "^2.6.1",
    "@typescript-eslint/parser": "^2.6.1",
    "eslint": "^6.6.0",
    "husky": "^3.0.9",
    "lint-staged": "^9.4.2",
    "nativescript-dev-webpack": "^1.3.0",
    "typescript": "~3.5.3"
  },
  "gitHead": "c06800e52ee1a184ea2dffd12a6702aaa43be4e3",
  "readme": "NativeScript Application",
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  },
  "lint-staged": {
    "**/*.+(js|ts)": [
      "eslint --quiet"
    ]
  },
  "eslintIgnore": [
    "**/node_modules/**",
    "**/dist/**",
    "src/assets/**",
    "platforms/**",
    "hooks/**",
    "webpack.config.js"
  ]
}
@sashok1337
Copy link
Author

sashok1337 commented Nov 6, 2019

Fixed after changing lines in next files

/node_modules/nativescript-masked-text-field/angular/masked-text-value-accessor.js:

var text_value_accessor_1 = require("nativescript-angular/forms/value-accessors/text-value-accessor");
/** To: **/
var text_value_accessor_1 = require("@nativescript/angular/forms/value-accessors/text-value-accessor");

And

/node_modules/nativescript-masked-text-field/angular/masked-text-value-accessor.d.ts:

import { TextValueAccessor } from "nativescript-angular/forms/value-accessors/text-value-accessor";
/** To: **/
import { TextValueAccessor } from "@nativescript/angular/forms/value-accessors/text-value-accessor";

@PeterStaev
Copy link
Owner

@sashok1337 , this was a known problem with webpack and compatibility between scoped and old modules. This PR on the NS webpack repo should have this resolved.

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