简体   繁体   English

模块“ AppModule”导入的异常值“ MdlModule”

[英]Unexpected value 'MdlModule' imported by the module 'AppModule'

Just started experiencing this error after moving from angular2 Rc.5 to Final. 从angular2 Rc.5移到Final后才刚开始遇到此错误。 I don't know what might be causing it, but i think its from the angular2-mdl package. 我不知道是什么原因引起的,但我认为它来自angular2-mdl软件包。 Would be happy if someone can help me out. 如果有人可以帮助我会很高兴。

Here is the complete error message: 这是完整的错误消息:

Uncaught Error: Unexpected value 'MdlModule' imported by the module 'AppModule'

Here are my packages: 这是我的包裹:

"dependencies": {
"@angular/common": "2.0.0",
"@angular/compiler": "2.0.0",
"@angular/core": "2.0.0",
"@angular/forms": "2.0.0",
"@angular/http": "2.0.0",
"@angular/platform-browser": "2.0.0",
"@angular/platform-browser-dynamic": "2.0.0",
"@angular/router": "3.0.0",
"@angular/upgrade": "2.0.0",
"@angular2-mdl-ext/popover": "0.0.3",
"@angular2-mdl-ext/select": "0.0.2",
"angular2-jwt": "^0.1.23",
"angular2-mdl": "1.7.1",
"core-js": "^2.4.1",
"es6-shim": "^0.35.0",
"es7-reflect-metadata": "^1.6.0",
"jwt-decode": "^2.0.1",
"material-design-icons": "^3.0.1",
"material-design-lite": "^1.2.1",
"rxjs": "^5.0.0-beta.12",
"zone.js": "^0.6.23"
   },

"devDependencies": {
"@angularclass/hmr": "^1.0.1",
"@angularclass/hmr-loader": "^1.0.0",
"angular2-template-loader": "^0.4.0",
"css-loader": "^0.23.1",
"exports-loader": "^0.6.3",
"expose-loader": "^0.7.1",
"extract-text-webpack-plugin": "^1.0.1",
"favicons-webpack-plugin": "0.0.7",
"file-loader": "^0.8.5",
"html-loader": "^0.4.3",
"html-webpack-plugin": "^2.15.0",
"imports-loader": "^0.6.5",
"jasmine-core": "^2.4.1",
"json-loader": "^0.5.4",
"karma": "^0.13.22",
"karma-jasmine": "^0.3.8",
"karma-phantomjs-launcher": "^1.0.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^1.7.0",
"null-loader": "^0.1.1",
"phantomjs-prebuilt": "^2.1.7",
"raw-loader": "^0.5.1",
"sass-loader": "^4.0.0",
"style-loader": "^0.13.1",
"ts-loader": "^0.8.1",
"tslint": "^3.5.0",
"tslint-loader": "^2.1.3",
"typedoc": "^0.4.4",
"typescript": "^2.0.2",
"typings": "^1.0.4",
"webpack": "^1.13.2",
"webpack-dashboard": "^0.1.8",
"webpack-dev-server": "^1.15.1",
"webpack-merge": "^0.14.1",
"webpack-node-externals": "^1.4.3"
  }

My build and dev system is: "webpack": "1.13.2" 我的构建和开发系统是:“ webpack”:“ 1.13.2”

After upgrading webpack to v2 along side its dependencies and including awesome-typescript-loader to handle my ts files in webpack.config, the error disappeared and everything seems to be normal now. 将webpack与其依赖关系一起升级到v2,并在webpack.config中包括awesome-typescript-loader来处理我的ts文件后,错误消失了,一切似乎现在都正常了。

Upgrade webpack to v2 将Webpack升级到v2

"extract-text-webpack-plugin": "^2.0.0-beta.4",
"webpack": "^2.1.0-beta.22",
"webpack-dev-server": "^2.1.0-beta.4",

Include awesome-typescript-loader to handle ts files 包括awesome-typescript-loader处理ts文件

  loaders: [
     {
      test: /\.ts$/,
      loaders: ['awesome-typescript-loader', 'angular2-template-loader']
     },
  ...
  ]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 模块“AppModule”在语法错误处导入的意外值“未定义” - Unexpected value 'undefined' imported by the module 'AppModule' at syntaxError 模块“ AppModule”导入的意外值“ PdfmakeModule” - Unexpected value 'PdfmakeModule' imported by the module 'AppModule' 模块'AppModule'导入的意外值'ImageUploadModule' - Unexpected value 'ImageUploadModule' imported by the module 'AppModule' Angular - 模块AppModule导入的意外值MatDialog - Angular - Unexpected value MatDialog imported by the module AppModule 模块'AppModule'导入的意外值'MyCustomModule' - Unexpected value 'MyCustomModule' imported by the module 'AppModule' 模块“ AppModule”导入的异常值“ BootstrapModalModule” - Unexpected value 'BootstrapModalModule' imported by the module 'AppModule' 模块“ AppModule”导入的异常值“ QRCodeModule” - Unexpected value 'QRCodeModule' imported by the module 'AppModule' 模块'AppModule'导入的意外值'[object Object]' - Unexpected value '[object Object]' imported by the module 'AppModule' 错误:意外的值“AngularFireAuth”。 由模块“AppModule”导入 - Error: Unexpected value 'AngularFireAuth'. imported by the module 'AppModule' 模块“AppModule”导入的意外值“AngularFirestore” - Unexpected value 'AngularFirestore' imported by the module 'AppModule'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM