ng2-ckeditor 错误模块未找到&模块的元数据版本不匹配

bai*_*772 1 npm-install angular

我正在尝试ng serve我的 angular 4 项目,我看到了这个

ERROR in /var/www/penderie1/src/app/admin/admin.module.ts (20,32): Cannot find module 'ng2-ckeditor'.
ERROR in /var/www/penderie1/src/app/myaccount/myaccount.module.ts (6,32): Cannot find module 'ng2-ckeditor'.
ERROR in /var/www/penderie1/src/app/app.module.ts (6,32): Cannot find module 'ng2-ckeditor'.
ERROR in Error: Error encountered resolving symbol values statically. Could not resolve ng2-ckeditor relative to /var/www/penderie1/src/app/app.module.ts., resolving symbol AppModule in /var/www/penderie1/src/app/app.module.ts, resolving symbol AppModule in /var/www/penderie1/src/app/app.module.ts
    at syntaxError (/var/www/penderie1/node_modules/@angular/compiler/bundles/compiler.umd.js:1729:34)
    at simplifyInContext (/var/www/penderie1/node_modules/@angular/compiler/bundles/compiler.umd.js:24979:23)
    at StaticReflector.simplify (/var/www/penderie1/node_modules/@angular/compiler/bundles/compiler.umd.js:24991:13)
    at StaticReflector.annotations (/var/www/penderie1/node_modules/@angular/compiler/bundles/compiler.umd.js:24418:41)
    at _getNgModuleMetadata (/var/www/penderie1/node_modules/@angular/compiler-cli/src/ngtools_impl.js:138:31)
    at _extractLazyRoutesFromStaticModule (/var/www/penderie1/node_modules/@angular/compiler-cli/src/ngtools_impl.js:109:26)
    at Object.listLazyRoutesOfModule (/var/www/penderie1/node_modules/@angular/compiler-cli/src/ngtools_impl.js:53:22)
    at Function.NgTools_InternalApi_NG_2.listLazyRoutes (/var/www/penderie1/node_modules/@angular/compiler-cli/src/ngtools_api.js:91:39)
    at AotPlugin._getLazyRoutesFromNgtools (/var/www/penderie1/node_modules/@ngtools/webpack/src/plugin.js:212:44)
    at _donePromise.Promise.resolve.then.then.then.then.then (/var/www/penderie1/node_modules/@ngtools/webpack/src/plugin.js:448:24)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:160:7)
Run Code Online (Sandbox Code Playgroud)

我不明白这个问题ck-editor在我的配置文件中正确包含。当我运行npm install ng-2-ckeditor --save并运行时ng serve,我看到此错误

ERROR in Error: Metadata version mismatch for module /var/www/penderie1/node_modules/ng2-ckeditor/lib/ng2-ckeditor.d.ts, found version 4, expected 3, resolving symbol AppModule in /var/www/penderie1/src/app/app.module.ts, resolving symbol AppModule in /var/www/penderie1/src/app/app.module.ts
    at syntaxError (/var/www/penderie1/node_modules/@angular/compiler/bundles/compiler.umd.js:1729:34)
    at simplifyInContext (/var/www/penderie1/node_modules/@angular/compiler/bundles/compiler.umd.js:24979:23)
    at StaticReflector.simplify (/var/www/penderie1/node_modules/@angular/compiler/bundles/compiler.umd.js:24991:13)
    at StaticReflector.annotations (/var/www/penderie1/node_modules/@angular/compiler/bundles/compiler.umd.js:24418:41)
    at _getNgModuleMetadata (/var/www/penderie1/node_modules/@angular/compiler-cli/src/ngtools_impl.js:138:31)
    at _extractLazyRoutesFromStaticModule (/var/www/penderie1/node_modules/@angular/compiler-cli/src/ngtools_impl.js:109:26)
    at Object.listLazyRoutesOfModule (/var/www/penderie1/node_modules/@angular/compiler-cli/src/ngtools_impl.js:53:22)
    at Function.NgTools_InternalApi_NG_2.listLazyRoutes (/var/www/penderie1/node_modules/@angular/compiler-cli/src/ngtools_api.js:91:39)
    at AotPlugin._getLazyRoutesFromNgtools (/var/www/penderie1/node_modules/@ngtools/webpack/src/plugin.js:212:44)
    at _donePromise.Promise.resolve.then.then.then.then.then (/var/www/penderie1/node_modules/@ngtools/webpack/src/plugin.js:448:24)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:160:7)
Run Code Online (Sandbox Code Playgroud)

sag*_*tel 5

安装 ng2-ckeditor 1.1.9 版。尝试npm install ng2-ckeditor@1.1.9 --save