Vibrant-Colors / node-vibrant

🎨 Extract prominent colors from an image
MIT License
2.01k stars 107 forks source link

3.1.5 fails angular (typescript) build #111

Closed inbarshani closed 2 years ago

inbarshani commented 4 years ago

ERROR in node_modules/node-vibrant/lib/color.d.ts(19,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/node-vibrant/lib/color.d.ts(20,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/node-vibrant/lib/color.d.ts(21,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/node-vibrant/lib/color.d.ts(22,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/node-vibrant/lib/color.d.ts(23,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/node-vibrant/lib/color.d.ts(24,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/node-vibrant/lib/color.d.ts(25,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/node-vibrant/lib/color.d.ts(37,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/node-vibrant/lib/color.d.ts(38,9): error TS1086: An accessor cannot be declared in an ambient context.

ameerahallie commented 4 years ago

I am also getting this error on trying to run a prod build.

Feargalicious commented 4 years ago

I think this is due to angular cli not being compatible with ts 3.7, until they update it you'll have to use ts <=3.5.3, so I had to roll back my TS to 3.5.3 and vibrant to 3.1.4

crutchcorn commented 4 years ago

Is this the case with Angular 9, does anyone know? I know they support TS3.7 now

princemaple commented 4 years ago

hey I just discovered this nice lib. I haven't used it in a project, but if it's true that the bug is related to typescript version it should be resolved now. I've been compiling angular 9 project with typescript 3.8 for a few weeks.

crutchcorn commented 2 years ago

I'm going to close this. 3.1.5 is older, and, upon spinning up a new project in Angular with the newest TypeScript, it seems that 3.1.6 has fixed this

Please let me know if I'm mistaken