compiler.js:2430 Uncaught Error: Unexpected value 'undefined' imported by the module 'AppModule'

compiler.js:2430 Uncaught Error: Unexpected value 'undefined' imported by the module 'AppModule'

import { FormsModule } from '@angular/core'; 添加到 app.module.ts 文件后
我得到

Uncaught Error: Unexpected value 'undefined' imported by the module 'AppModule'
        at syntaxError (compiler.js:2430)
        at compiler.js:18651
        at Array.forEach (<anonymous>)
        at CompileMetadataResolver.push../node_modules/@angular/compiler/fesm5/compiler.js.CompileMetadataResolver.getNgModuleMetadata (compiler.js:18620)
        at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._loadModules (compiler.js:26029)
        at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileModuleAndComponents (compiler.js:26010)
        at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler.compileModuleAsync (compiler.js:25970)
        at CompilerImpl.push../node_modules/@angular/platform-browser-dynamic/fesm5/platform-browser-dynamic.js.CompilerImpl.compileModuleAsync (platform-browser-dynamic.js:143)
        at compileNgModuleFactory__PRE_R3__ (core.js:17618)
        at PlatformRef.push../node_modules/@angular/core/fesm5/core.js.PlatformRef.bootstrapModule (core.js:17801) 

我请求社区帮助我。我是 Angular-7

的初学者

试试这个

import { FormsModule } from '@angular/forms';