ng2-smart-table缺少依赖关系完成程序 [英] ng2-smart-table has missing dependencies completer

查看:311
本文介绍了ng2-smart-table缺少依赖关系完成程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Ng2SmartTable,但出现此错误:

I am using Ng2SmartTable and I have this error:

目标入口点"ng2-smart-table"中的错误已丢失 依赖项: -@ akveo/ng2-completer

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-保存ng2-smart-table

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

2.npm i ng2-completer-保存

2.npm i ng2-completer --save

3.npm我rxjs-compat-保存

3.npm i rxjs-compat --save

推荐答案

在尝试安装 ng2-smart-table

在ng2-smart-table中,以以下方式导入 CompleterService

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

从'@ akveo/ng2-completer'导入{CompleterService};

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

但是,如果我们从node_modules打开ng2-completer,您会看到ng2-completer不在'@ akveo'文件夹中

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

因此,只需在node_module中创建一个新文件夹,并将其重命名为 @akveo ,然后将 ng2-completer 文件复制到 @akevo 文件夹中

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

现在打开package.json,package.lock.json并将 ng2-completer 更改为 @ akveo/ng2-completer 并重新启动服务器

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

它将运行正常

谢谢

这篇关于ng2-smart-table缺少依赖关系完成程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆