Reputation: 3498
I am trying ng serve
on my angular 4 project and I see this
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)
I don't understand the issue as ck-editor
is included correctly in my config files.
When I run npm install ng-2-ckeditor --save
and run ng serve
,i see this error
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)
Upvotes: 1
Views: 2186
Reputation: 461
Install version 1.1.9 of ng2-ckeditor. try npm install [email protected] --save
Upvotes: 4
Reputation: 6568
brother, it is a version issue. try updating your angular version from 4 to 5 if it is 4, or else try
try to use
"ng2-ckeditor": "1.1.9",
instead
"ng2-ckeditor": "^1.1.9",
Upvotes: 1