Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nativescript Angular cannot find module "nativescript-angular/forms"

I am going through a tutorial that requires an import from "nativescript-angular/forms" for binding but I am getting an error that says

Cannot find module 'nativescript-angular/forms' or its corresponding type declarations.ts(2307)

import { NativeScriptFormsModule } from 'nativescript-angular/forms';

How can I fix this?

like image 526
Truong Nguyen Avatar asked Jun 26 '26 08:06

Truong Nguyen


1 Answers

Since Nativescript 7, the imports for Angular related modules are updated to @nativescript/angular. The updated version of your code should look something like:

import { NativeScriptFormsModule } from '@nativescript/angular';
like image 110
William Juan Avatar answered Jun 28 '26 15:06

William Juan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!