ng2-smart-table
ng2-smart-table copied to clipboard
Ng2SmartTableModule is not an NgModule : error in angular-cli
Trying to use ng2-smart-table in angular-cli 1.0.0-beta.24 this error id displayed when starting the app. I'm need to use at least beta.24 due to requirements of other packages. Any scheduling for solving this problem?
Same Problem Here . Angular CLI beta 1.0.0-beta.24
by building my project with ng build --aot I became the following:
ERROR in Unexpected value 'Ng2SmartTableModule in ../node_modules/ng2-smart-table/build/src/ng2-smart-table.module.d.ts' imported by the module 'AppModule in ../src/app/app.module.ts'
ERROR in ./src/main.ts Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in '../src' @ ./src/main.ts 5:0-74 @ multi main
ERROR in .//@angular/core/src/linker/system_js_ng_module_factory_loader.js Module not found: Error: Can't resolve '..../src/$$_gendir' in '../node_modules/@angular/core/src/linker' @ .//@angular/core/src/linker/system_js_ng_module_factory_loader.js 69:15-36 85:15-102 @ .//@angular/core/src/linker.js @ .//@angular/core/src/core.js @ .//@angular/core/index.js @ ./src/main.ts @ multi main
same problem here.
ng build --aot
, it build fails:
`ERROR in Unexpected value 'Ng2SmartTableModule in /Applications/MAMP/htdocs/Repo/Angular2/ng2-smart-table-proj/node_modules/ng2-smart-table/build/src/ng2-smart-table.module.d.ts' imported by the module 'TableModule in /Applications/MAMP/htdocs/Repo/Angular2/ng2-smart-table-proj/src/app/feature/table/table.module.ts'
ERROR in ./src/main.ts Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in '/Applications/MAMP/htdocs/Repo/Angular2/ng2-smart-table-proj/src' @ ./src/main.ts 4:0-74 @ multi ./src/main.ts
ERROR in ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js Module not found: Error: Can't resolve '/Applications/MAMP/htdocs/Repo/Angular2/ng2-smart-table-proj/src/$$_gendir' in '/Applications/MAMP/htdocs/Repo/Angular2/ng2-smart-table-proj/node_modules/@angular/core/src/linker' @ ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js 71:15-36 87:15-102 @ ./~/@angular/core/src/linker.js @ ./~/@angular/core/src/core.js @ ./~/@angular/core/index.js @ ./src/main.ts @ multi ./src/main.ts`
I also have the same problem and I'm with angular-cli: 1.0.0-beta.26.
ERROR in Ng2SmartTableModule is not an NgModule
@jmcsoberano Yeah, my angular-cli version is also 1.0.0-beta.26
I cannot find answer from the google. Who has found the answer?
I had same issue. I tried to install ng2-smart-tables through package.json and start npm install. After ng serve I got this error message. Solution was that I installed it manualy with npm install --save ng2-smart-table, but previously deleted ng2-smart-tables folder from node_modules that I got earlier. This worked for me, angular-cli version is 1.0.0-beta.26.
sudo npm install ng2-smart-table@latest --save
, it install "ng2-smart-table": "^0.5.1-0"
in package.json, and it is right now. Maybe it fix the bug in this version. My angular-cli version is also 1.0.0-beta.26
.
Hello, I've been getting @klavs1us 's error over and over. But then I've downloaded their demo, built it for prod with aot = true and it ran successfully. I opened the package.json and i saw that they use 1.2.2 version of smart-table. You should just delete your old smart table + folder in node modules and copy this one "ng2-smart-table": "1.2.2" into your package.json and run npm install my angular-cli version is "^1.7.2" but I didn't changed it I hope I can help someone, cause I lost my entire day, I dont want to waste yours.
Thanks @AlexMihov96 it helps me a lots.
Do you have any ideas on how to fix it in Angular 6?
Hello, have you tried to lower the version of the ng2-smart-table package ?
I tried with 1.3.0 and 1.2.2 but still shows "Unexpected value 'Ng2SmartTableModule in .." when I execute ng build --prod --env=prod
any ideas or solution? I'm using angular 5
@geremora try using the same angular-cli package as mine, and run ng build --prod only
I am getting error like ERROR in src/app/app.module.ts(4,37): error TS2307: Cannot find module 'ng2-smart-table'.
i done 1.npm install --save ng2-smart-table 2.npm i rxjs-compat --save 3.npm i ng2-completer –save
Still i am getting error.
I'm using angular 8.2.5, I solved with rxjs-compat and ng2-completer.
@Kappyh PLs share your angular version /angular cli version, also share the version of rxjs and ng2 completer..It would be helpful for us
@Kappyh PLs share your angular version /angular cli version, also share the version of rxjs and ng2 completer..It would be helpful for us
Sorry, I'm not currently working in this project since 2020.