I've been using vis-timeline 6.5.2 successfully with Angular for some time.
In my package.json dependencies, I have "vis-timeline": "^6.5.2"
In my typescript files, I have import { Timeline, DataSet } from 'vis-timeline';
Everything works.
Now, I am trying to upgrade to version 7.4.7. I changed the version in package.json and ran npm install.
First, my import statements break with
Module '"../../../../node_modules/vis-timeline/declarations"' declares 'DataSet' locally, but it is not exported
I can fix this by changing the imports to import { Timeline, DataSet } from 'vis-timeline/standalone';, but I have no idea if this is the correct thing to do.
When I try to run the project with ng s I get these errors:
Error: ./node_modules/vis-timeline/peer/umd/vis-timeline-graph2d.min.js
Module not found: Error: Can't resolve 'vis-data/peer/umd/vis-data.js' in 'C:\Users\Ken\workspace\hatch-tools\node_modules\vis-timeline\peer\umd'
and also
Error: ./node_modules/vis-timeline/peer/umd/vis-timeline-graph2d.min.js
Module not found: Error: Can't resolve 'moment' in 'C:\Users\Ken\workspace\hatch-tools\node_modules\vis-timeline\peer\umd'
If I add moment and vis-data to my package.json I get yet more obscure errors.
Any advice on how to get vis-timeline 7 working in Angular?
I am on Angular 11.2.8 and Node 14.16.1.