Module “angular2-csv” has no exported member “Angular2Csv”.ts(2305)

huangapple go评论58阅读模式
英文:

Module '"angular2-csv"' has no exported member 'Angular2Csv'.ts(2305)

问题

我正在尝试在我的Angular 15应用程序中使用Angular2csv包。我有一个导出服务,在其中我已经导入了它:

import { Angular2Csv } from 'angular2-csv';

这个服务在我的共享模块中提供。在共享模块中,我还将Angular2CsvModule添加到了导入数组中。但是当我编译代码时出现错误。请帮忙解决这个问题。

英文:

I am trying to use Anguar2csv package in my angular 15 application. I have a export service where I have imported it:

import { Angular2Csv } from 'angular2-csv';

This service is provided in my shared module. And in that shared module I have kept the Angular2CsvModule also in imports array. But the error occurs when I am compiling the code. Please help how to resolve this.

答案1

得分: 1

"anguar2-csv"最初是为Angular 6构建的,不再与Ivy编译的应用程序兼容。
尝试使用这个分支而不是 https://www.npmjs.com/package/export-to-csv
它提取了功能并移除了与Angular相关的部分。

英文:

anguar2-csv was originally build for angular 6 and no longer work with Ivy compiled applications.
try using this fork instead https://www.npmjs.com/package/export-to-csv
it extracted the functionality and removed the angular related part

huangapple
  • 本文由 发表于 2023年4月13日 20:04:48
  • 转载请务必保留本文链接:https://go.coder-hub.com/76005194.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定