nativescript-checkbox
nativescript-checkbox copied to clipboard
Cannot find module 'nativescript-angular/forms/value-accessors/base-value-accessor'.
With latest angular version it seems not to work anymore.
My Packages:
"dependencies": {
"ajv": "^6.10.2",
"crypto-js": "^3.1.9-1",
"fecha": "^3.0.3",
"jsonschema-key-compression": "^1.0.2",
"nativescript-app-sync": "^1.0.7",
"nativescript-barcodescanner": "^3.4.0",
"nativescript-bitmap-factory": "^1.8.1",
"nativescript-bootreceiver": "^1.0.0",
"nativescript-exit": "^1.0.1",
"nativescript-permissions": "^1.3.8",
"nativescript-plugin-firebase": "^10.1.1",
"nativescript-secure-storage": "^2.6.0",
"nativescript-svg": "^1.3.7",
"nativescript-theme-core": "^2.0.24",
"nativescript-toolbox": "^3.0.1",
"nativescript-uuid": "^0.0.1",
"nativescript-vibrate": "^2.1.3",
"nativescript-webview-interface": "^1.4.3",
"nativescript-webview-utils": "^3.0.1",
"nativescript-zxing": "^1.5.9",
"plugin": "^0.3.3",
"tns-core-modules": "^6.2.0"
},
"devDependencies": {
"@types/bootstrap": "^4.3.1",
"@types/jquery": "^3.3.31",
"@types/node": "^12.12.6",
"@typescript-eslint/eslint-plugin": "^2.6.1",
"@typescript-eslint/parser": "^2.6.1",
"copy-webpack-plugin": "^5.0.4",
"eslint": "^6.6.0",
"eslint-config-prettier": "^6.5.0",
"eslint-config-standard": "^14.1.0",
"eslint-plugin-html": "^6.0.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-node": "10.0.0",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-promise": "4.2.1",
"eslint-plugin-standard": "4.0.1",
"nativescript-dev-webpack": "^1.3.0",
"nativescript-worker-loader": "^0.9.5",
"node-sass": "^4.13.0",
"prettier": "^1.18.2",
"tns-platform-declarations": "^6.2.0",
"typescript": "^3.7.2"
},
Results in:
ERROR in node_modules/@nstudio/nativescript-checkbox/angular/index.d.ts:2:35 - error TS2307: Cannot find module 'nativescript-angular/forms/value-accessors/base-value-accessor'.
2 import { BaseValueAccessor } from 'nativescript-angular/forms/value-accessors/base-value-accessor';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Confirm. With below config works fine:
"@angular/core": "^8.2.11",
"@nstudio/nativescript-checkbox": "^1.0.0",
"nativescript-angular": "^8.2.2",
"tns-core-modules": "^6.1.2",
With this config it didn't work:
"@angular/core": "^8.2.13",
"@nstudio/nativescript-checkbox": "^1.0.0",
"nativescript-angular": "^8.20.0",
"tns-core-modules": "^6.2.0",
same
The core team introduced a breaking change. That is why. The plugin will need to be updated.
@deoomen @CoooWeee @yonkoGH In your webpack.config.js change the alias to this:
alias: {
"~": appFullPath,
"nativescript-angular": "@nativescript/angular",
},
@DickSmith added your fix in my webpack.config.js but I'm still getting
ERROR in node_modules/@nstudio/nativescript-checkbox/angular/index.d.ts:2:35 - error TS2307: Cannot find module 'nativescript-angular/forms/value-accessors/base-value-accessor'.
2 import { BaseValueAccessor } from 'nativescript-angular/forms/value-accessors/base-value-accessor';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/nativescript-drop-down/angular/index.d.ts:2:35 - error TS2307: Cannot find module 'nativescript-angular/forms/value-accessors/base-value-accessor'.
2 import { BaseValueAccessor } from "nativescript-angular/forms/value-accessors/base-value-accessor";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Same issue over here.
looks like core team released a fix to export how it should be with 8.20.1
of ns-angular. I'd try updating your nativescript-angular dependency and also be sure your project has skipLibCheck: true
in your tsconfig since you don't typically need to analyze node_modules during builds.
the fix looks like it’s still sitting on a release branch and has not been merged into master (am I wrong?). I changed my “nativescript-angular” version to “^8.20.1” and got npm install error saying that version doesn’t exist
ah yea, possibly. I forget if they publish the nativescript-angular
package nightly or not. Might could try it from npm install nativescript-angular@next
doubtful they do that. If that doesn't work, you could point it to the git branch I believe to test it for now.
any update?