svgdotjs / svg.js

The lightweight library for manipulating and animating SVG
https://svgjs.dev
Other
11.04k stars 1.08k forks source link

svg.js 3.0.15 angular 8 #1054

Closed PiotrFr closed 4 years ago

PiotrFr commented 4 years ago

After upgrade from svg.js 3.0.14 to 3.0.15

package.json

   "@svgdotjs/svg.draggable.js": "^3.0.2",
    "@svgdotjs/svg.filter.js": "^3.0.7",
    "@svgdotjs/svg.js": "^3.0.15",
    "@svgdotjs/svg.panzoom.js": "^2.0.3",

I get

ERROR in ../node_modules/@svgdotjs/svg.filter.js/node_modules/@svgdotjs/svg.js/svg.js.d.ts:5:1 - error TS6200: Definitions of the following identifiers conflict with those in another file: BuiltInArray, utils, defaults, easing, regex, namespaces, AttrNumberValue, SVGTypeMapping, SvgType, ClipPathType, TextType, GType, AType, ParentElement, AttrTypeMapping, ElementAlias, AttributeReference, ArrayAlias, Array, Point, PointArray, NumberUnit, Number, NumberAlias, LineCommand, CurveCommand, PathCommand, PathArrayAlias, PathArray, FlipType, ArrayXY, CoordinateXY, MatrixAlias, Matrix, EventObject, EventTarget, ColorAlias, Color, Box, MorphValueLike, Morphable, ObjectBag, NonMorphable, TransformBag, Ease, Controller, Queue, Timeline, TimeLike, Runner, Animator, ParentTypeAlias, ParentClassAlias, QuerySelector, ParentQueryAlias, ParentQueryMapping, ParentQueryResultMapping, PutInMapping, PutInResultMapping, Dom, ClipPath, Container, Defs, Svg, Symbol, Element, Circle, Ellipse, Stop, Gradient, G, A, Image, PointArrayAlias, Line, Marker, Mask, Path, Pattern, Polyline, Polygon, Rect, Shape, Text, Tspan, TextPath, Use, ViewBoxAlias

5 declare class BuiltInArray<T> extends Array<T> { }
  ~~~~~~~

  ../node_modules/@svgdotjs/svg.js/svg.js.d.ts:5:1
    5 declare class BuiltInArray<T> extends Array<T> { }
      ~~~~~~~
../node_modules/@svgdotjs/svg.filter.js/node_modules/@svgdotjs/svg.js/svg.js.d.ts:1332:11 - error TS2420: Class 'Circle' incorrectly implements interface 'CircleMethods'.
  Type 'Circle' is missing the following properties from type 'CircleMethods': filterWith, filterer, unfilter

1332     class Circle extends Shape implements CircleMethods {
               ~~~~~~
../node_modules/@svgdotjs/svg.filter.js/node_modules/@svgdotjs/svg.js/svg.js.d.ts:1344:11 - error TS2420: Class 'Ellipse' incorrectly implements interface 'CircleMethods'.
  Type 'Ellipse' is missing the following properties from type 'CircleMethods': filterWith, filterer, unfilter

1344     class Ellipse extends Shape implements CircleMethods {
               ~~~~~~~
../node_modules/@svgdotjs/svg.js/svg.js.d.ts:5:1 - error TS6200: Definitions of the following identifiers conflict with those in another file: BuiltInArray, utils, defaults, easing, regex, namespacesumber, NumberAlias, LineCommand, CurveCommand, PathCommand, PathArrayAlias, PathArray, FlipType, ArrayXY, CoordinateXY, MatrixAlias, Matrix, EventObject, EventTarget, ColorAlias, Color, Box, MorphValueLike, Morphable, ObjectBag, NonMorphable, TransformBag, Ease, Controller, Queue, Timeline, TimeLike, Runner, Animator, ParentTypeAlias, ParentClassAlias, QuerySelector, ParentQueryAlias, ParentQueryMapping, ParentQueryResultMapping, PutInMapping, PutInResultMapping, Dom, ClipPath, Container, Defs, Svg, Symbol, Element, Circle, Ellipse, Stop, Gradient, G, A, Image, PointArrayAlias, Line, Marker, Mask, Path, Pattern, Polyline, Polygon, Rect, Shape, Text, Tspan, TextPath, Use, ViewBoxAlias

5 declare class BuiltInArray<T> extends Array<T> { }
  ~~~~~~~

  ../node_modules/@svgdotjs/svg.filter.js/node_modules/@svgdotjs/svg.js/svg.js.d.ts:5:1
    5 declare class BuiltInArray<T> extends Array<T> { }
      ~~~~~~~
    Conflicts are in this file.

with

   "@svgdotjs/svg.draggable.js": "^3.0.2",
    "@svgdotjs/svg.filter.js": "^3.0.7",
    "@svgdotjs/svg.js": "3.0.14",        <====
    "@svgdotjs/svg.panzoom.js": "^2.0.3",

is OK

Fuzzyma commented 4 years ago

Mh that is strange. Why this error keeps coming back? Can you try to delete package-lock.json and node_modules? Maybe this fixes it. This error comes from svg.filter.js pulling the wrong version of svg.js and therefore you have 2 versions of svg.js which conclict with eachother.

PiotrFr commented 4 years ago

Thank you for tips. It was enough to delete yarn.lock.

Thank you :) https://citysoft.pl/test