Currently, I am utilizing typescript with aurelia/aurelia-cli. After npm installing chart.js
, I proceeded to add it to my aurelia.json
file like so:
"dependencies": [
...
{
"name": "chartjs",
"path": "../node_modules/chart.js/dist",
"main": "Chart"
},
]
Additionally, typings were executed using the following command:
typings install dt~chart.js --global --save
My current hurdle involves attempting to import it in one of my components:
import * as Chart from 'chartjs'
However, this action triggers the error message:
Cannot find module 'chartjs'.
I have also experimented with these variations:
... from 'chart'
... from 'Chart'
... from 'Chart.js'
... from 'chartjs'
import * as chart ...
import * as chartjs ...