@tomwanzek @gustavderdrache @borisyankov
@types/d3-format package and had problems.Before TS upgrade: (no errors)
After TS upgrade:
Error message:
node_modules/@types/d3-shape/index.d.ts
(2273,19): Cannot find name 'CanvasPathMethods'.
From what I can tell, the @types/d3-format package doesn't depend on @types/d3-shape, so it's likely that some other dependency (either in your package.json or pulled as a dependency of something else) is causing this problem for you.
That having been said, you're in luck! It looks like this issue was corrected in version 1.2.4 of @types/d3-shape - see this PR and the published index.d.ts on unpkg. Once you've updated that, you should be on your merry way.
You're right about other dependency pulling in @types/d3-shapes. No longer an issue for me. Thanks!
I have the same issue after upgrading to angular 7 with typescript 3.1.1.
I think the problem is with @types/d3-shapes. Is there a fix to this?
Problem come from TypeScript 3.1. They renamed CanvasPathMethods to CanvasPath. Use CanvasPath under TypeScript 3.1. If you need to support also older TypeScript versions, use d3. CanvasPath_D3Shape. See d3-shape/index.d.ts.
I'm not referencing the types directly but instead am using a library that depends on them: d3-ng2-service.
So I'm not entirely sure how to fix this, any help would be appreciated...
The package d3-ng2-service may need an update for TypeScript 3.1. Though I don't think it should: package.json.
Make sure your packages are all up to date by removing node_modules and run npm install.
@denisname thank you for that hint. I too had d3-ng2-service depend on @types/d3-shape but because of yarn.lock file didn't update to a later version (1.2.7) which has the fix. all good now.
Most helpful comment
I have the same issue after upgrading to angular 7 with typescript 3.1.1.
I think the problem is with
@types/d3-shapes. Is there a fix to this?