Hello guys,
I was trying to use the package @mongodb-js/charts-embed-dom
served by mongodb in this doc in my Vue application and it runs normally in my localhost. But when I try to build it i got some typescript errors inside this package.
ERROR Failed to compile with 3 errors6:59:02 PM
error in /home/runner/work/xavier/xavier/node_modules/@mongodb-js/charts-embed-dom/dist/declarations/src/types.d.ts
ERROR Build failed with errors.
ERROR in /home/runner/work/xavier/xavier/node_modules/@mongodb-js/charts-embed-dom/dist/declarations/src/types.d.ts(5,29):
5:29 Type expected.
3 | LIGHT = "light"
4 | }
> 5 | export declare type Theme = `${THEME}`;
| ^
6 | export declare enum SCALING {
7 | FIXED = "fixed",
8 | SCALE = "scale"
error in /home/runner/work/xavier/xavier/node_modules/@mongodb-js/charts-embed-dom/dist/declarations/src/types.d.ts
ERROR in /home/runner/work/xavier/xavier/node_modules/@mongodb-js/charts-embed-dom/dist/declarations/src/types.d.ts(10,31):
10:31 Type expected.
8 | SCALE = "scale"
9 | }
> 10 | export declare type Scaling = `${SCALING}`;
| ^
11 | export declare enum ENCODING {
12 | BASE64 = "base64",
13 | BINARY = "binary"
error in /home/runner/work/xavier/xavier/node_modules/@mongodb-js/charts-embed-dom/dist/declarations/src/types.d.ts
ERROR in /home/runner/work/xavier/xavier/node_modules/@mongodb-js/charts-embed-dom/dist/declarations/src/types.d.ts(15,36):
15:36 Type expected.
13 | BINARY = "binary"
14 | }
> 15 | export declare type EncodingType = `${ENCODING}`;
| ^
16 | export declare type PlainObject = Record<string, unknown>;
17 | /**
18 | * Shared options for embedding
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! herospark-xavier@1.118.0 build:staging: `vue-cli-service build --mode staging`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the herospark-xavier@1.118.0 build:staging script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2023-03-27T18_59_02_757Z-debug.log
Error: Process completed with exit code 1.
I’m using:
“vue”: “^2.6.11”,
“typescript”: “~3.9.3”,
and my build command is:
"build:staging": "vue-cli-service build --mode staging",