Skip to content
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

Cannot find module 'nativescript-angular/forms/value-accessors/base-value-accessor'. #118

Open
CoooWeee opened this issue Nov 6, 2019 · 10 comments

Comments

@CoooWeee
Copy link

CoooWeee commented Nov 6, 2019

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';
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@deoomen
Copy link

deoomen commented Nov 6, 2019

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",

@YoussefGheith
Copy link

same

@bradmartin
Copy link
Collaborator

The core team introduced a breaking change. That is why. The plugin will need to be updated.

@DickSmith
Copy link

DickSmith commented Nov 6, 2019

@deoomen @CoooWeee @yonkoGH
In your webpack.config.js change the alias to this:

     alias: {
        "~": appFullPath,
        "nativescript-angular": "@nativescript/angular",
      },

DickSmith added a commit to DickSmith/nativescript-dev-webpack that referenced this issue Nov 6, 2019
nstudio/nativescript-checkbox#118
PeterStaev/NativeScript-Drop-Down#229

From what I've seen for the `@nativescript/angular` package, all mappings should be 1-1 anyway, so this should work, any exceptions to that assumption can also be remapped here for the specific cases.
@brandoncanaday
Copy link

@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";
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@ditoglez
Copy link

ditoglez commented Nov 8, 2019

Same issue over here.

@bradmartin
Copy link
Collaborator

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.

@brandoncanaday
Copy link

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

@bradmartin
Copy link
Collaborator

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.

@brandoncanaday
Copy link

any update?

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

7 participants