AnswerBun.com

Angular Library Compile Time Error "Invariant violated: No format-path or format"

I have an Angular 11 project that is trying to integrate SpreadJS Designer, but is failing during the ngcc step Compiling @grapecity/spread-sheets-designer-angular : esm2015 as esm2015 with the 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)

How do I further diagnose and fix this problem?

Here is the output of npx ng version for my project:

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

Then rm -rf node_modules && npm install; npm ls | grep grapecity gives this output:

├─┬ @grapecity/[email protected]
│ └── @grapecity/[email protected] deduped
├── @grapecity/[email protected]
├─┬ @grapecity/[email protected]
│ ├── @grapecity/[email protected] deduped
├─┬ @grapecity/[email protected]
│ └── @grapecity/[email protected] deduped
├─┬ @grapecity/[email protected]
│ └── @grapecity/[email protected] deduped
├── @grapecity/[email protected]
├─┬ @grapecity/[email protected]
├── @grapecity/[email protected]
├─┬ @grapecity/[email protected]
│ └── @grapecity/[email protected] deduped
├─┬ @grapecity/[email protected]
│ ├── @grapecity/[email protected] deduped
│ └── @grapecity/[email protected] deduped
├─┬ @grapecity/[email protected]
│ └── @grapecity/[email protected] deduped
├─┬ @grapecity/[email protected]
│ └── @grapecity/[email protected]
├─┬ @grapecity/[email protected]
│ └── @grapecity/[email protected] deduped
├─┬ @grapecity/[email protected]
│ └── @grapecity/[email protected] deduped
├─┬ @grapecity/[email protected]
│ └── @grapecity/[email protected] deduped

Stack Overflow Asked by vicatcu on February 22, 2021

1 Answers

One Answer

I had some problems with SpreadJS + Designer following their poor examples .. anyway. what helped me was:

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,
},

Answered by ricardoaleixoo on February 22, 2021

Add your own answers!

Related Questions

Copy each cell in a range to multi-cell range

2  Asked on November 29, 2021 by preston-richardson

   

How to make dynamic custom textarea with jquery?

3  Asked on November 29, 2021 by david-noya

     

private static field Java

3  Asked on November 29, 2021

         

unordered_map excess calls to hash function

4  Asked on November 29, 2021 by amir-kirsh

   

cant load static file in django

1  Asked on November 29, 2021

       

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved.