0

我导入了 xlsx 样式的包来设置我的 xlsx 样式表的样式,然后我做了'yarn start'。之后我得到了错误,我正在附加错误

错误:

Webpack:84.273 秒后完成。

错误 编译失败,出现 3 个错误 4:08:23 PM

未找到此依赖项:

  • fs 在 ./node_modules/xlsx-style/xlsx.js, ./node_modules/xlsx-style/ods.js

要安装它,您可以运行: npm install --save fs

未找到此相关模块:

  • ./node_modules/xlsx-style/dist/cpexcel.js 中的 ./cptable /home/administrator/Documents/jan21/pgh/src/main/webapp/app/entities/configuration/financial-year-settings.component 中的错误。 ts(37,9): TS2305: Module '"/home/administrator/Documents/jan21/pgh/src/main/webapp/app/entities/service/calendarexcel.service"' 没有导出成员'CalendarExcelService'。版本:typescript 2.7.2 时间:54018ms ✖ 「wdm」:1772 个模块
4

1 回答 1

1

我通过在 webpack.config.js 中提供此代码来修复我的错误,这里的代码是:

node: {
 fs: 'empty'
 },
 externals: [ {
 './cptable': 'var cptable' 
} ]
于 2019-01-23T06:19:26.683 回答