ng2-smart-table has missing dependencies completer

混江龙づ霸主 提交于 2020-06-15 04:41:04

问题


I am using Ng2SmartTable and I have this error:

ERROR in The target entry-point "ng2-smart-table" has missing dependencies: - @ akveo / ng2-completer

I have already tried the following commands and it does not work:

1.npm install --save ng2-smart-table

2.npm i ng2-completer --save

3.npm i rxjs-compat --save


回答1:


I also faced the same issue while trying to install ng2-smart-table

In ng2-smart-table the CompleterService is imported in the following way

import { CompleterService } from '@akveo/ng2-completer';

But if we open ng2-completer from node_modules you can see the ng2-completer is not within the '@akveo' folder

So just create a new folder in node_module and rename it as @akveo and copy the ng2-completer files into @akevo folder

Now open package.json , package.lock.json and change ng2-completer to @akveo/ng2-completer and restart the server

it will be working fine

Thanks




回答2:


Installing the dependencies makes it work in dev, but in the build prod there is a problem.

For Angular 9+ try this:

in your tsconfig.app.json, set

 "angularCompilerOptions": {
    "enableIvy": true
  }

its worked for me, with @akveo/ng2-completer dependency only.




回答3:


try this.

npm i rxjs-compat --save
npm i @akveo/ng2-completer --save

See here. https://github.com/yggg/ng2-smart-table/commit/8a4f0bb

As mentioned above, you need to be careful.



来源:https://stackoverflow.com/questions/61027486/ng2-smart-table-has-missing-dependencies-completer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!