Chart js fail deployment

Hello guys, recently i am trying render to build my website, it is actually my fyp project, i am deployment my vue js on render , and i use the Chart js, but the problem is no matter how many time i had tried it keep error why? The messages shown in the logs are:

  • Building for production…
    ERROR Failed to compile with 1 error5:32:03 PM
    error in ./src/components/admin/BarChart.vue?vue&type=script&lang=js
    Module not found: Error: Can’t resolve ‘chart.js’ in ‘/opt/render/project/src/frontend/src/components/admin’
    ERROR Error: Build failed with errors.
    Error: Build failed with errors

But the problem is, i already imported Chart js in my BarChart.vue, and also i check my package.json consist the Chart.js.

Is anyone know how to solve this problem? Hope can getting your help, appreciate

Hi there,

These type of errors are typically caused by the component not actually existing in the place they are being referenced, whether outright or because of a casing/spelling mismatch.

Regards,
Mike


Render Support Engineer, MT (UTC-6, UTC-7 in Winter)

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.