gpt4 book ai didi

Angular库编译时错误 "Invariant violated: No format-path or format"

转载 作者:行者123 更新时间:2023-12-03 16:27:42 27 4
gpt4 key购买 nike

我有一个Angular 11项目,试图集成SpreadJS Designer,但在ngcc步骤Compiling @grapecity/spread-sheets-designer-angular : esm2015 as esm2015期间失败,但有一个异常(exception):

Error on worker #3: Error: Invariant violated: No format-path or format for /path/to/my/project/node_modules/@grapecity/spread-sheets-designer-angular : main (formatPath: bundles/grapecity-spread-sheets-designer-angular.umd.js | format: undefined)


如何进一步诊断和解决此问题?
这是我的项目的 npx ng version的输出:
Angular CLI: 11.0.2
Node: 14.15.1
OS: linux x64

Angular: 11.0.2
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1100.2
@angular-devkit/build-angular 0.1100.2
@angular-devkit/core 11.0.2
@angular-devkit/schematics 11.0.2
@angular/cdk 11.0.1
@angular/material 11.0.1
@schematics/angular 11.0.2
@schematics/update 0.1100.2
rxjs 6.5.3
typescript 4.0.5
然后 rm -rf node_modules && npm install; npm ls | grep grapecity给出以下输出:
├─┬ @grapecity/spread-excelio@14.0.3
│ └── @grapecity/spread-sheets@14.0.3 deduped
├── @grapecity/spread-sheets@14.0.3
├─┬ @grapecity/spread-sheets-angular@14.0.3
│ ├── @grapecity/spread-sheets@14.0.3 deduped
├─┬ @grapecity/spread-sheets-barcode@14.0.3
│ └── @grapecity/spread-sheets@14.0.3 deduped
├─┬ @grapecity/spread-sheets-charts@14.0.3
│ └── @grapecity/spread-sheets@14.0.3 deduped
├── @grapecity/spread-sheets-designer@14.0.3
├─┬ @grapecity/spread-sheets-designer-angular@14.0.3
├── @grapecity/spread-sheets-designer-resources-en@14.0.3
├─┬ @grapecity/spread-sheets-languagepackages@14.0.3
│ └── @grapecity/spread-sheets@14.0.3 deduped
├─┬ @grapecity/spread-sheets-pdf@14.0.3
│ ├── @grapecity/spread-sheets@14.0.3 deduped
│ └── @grapecity/spread-sheets-print@14.0.3 deduped
├─┬ @grapecity/spread-sheets-pivot-addon@14.0.3
│ └── @grapecity/spread-sheets@14.0.3 deduped
├─┬ @grapecity/spread-sheets-pivots@14.0.0
│ └── @grapecity/spread-sheets@14.0.0
├─┬ @grapecity/spread-sheets-print@14.0.3
│ └── @grapecity/spread-sheets@14.0.3 deduped
├─┬ @grapecity/spread-sheets-resources-ja@14.0.3
│ └── @grapecity/spread-sheets@14.0.3 deduped
├─┬ @grapecity/spread-sheets-shapes@14.0.3
│ └── @grapecity/spread-sheets@14.0.3 deduped

最佳答案

无论如何,我还是在SpreadJS + Designer的一些不良示例之后遇到了一些问题。帮助我的是:

import { DomSanitizer } from '@angular/platform-browser'

.
.
.

title: 'Tabela customizável',
designer: null,
props: {
styleInfo: **this.sanitizer.bypassSecurityTrustStyle**('width: 100%; height: calc(100vh - 300px)'),
config: this.spreadMenuConfig,
},

关于Angular库编译时错误 "Invariant violated: No format-path or format",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65081584/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com