Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation of 1.2.0 Crashes Build #84

Open
jmtimko5 opened this issue Sep 28, 2021 · 0 comments
Open

Installation of 1.2.0 Crashes Build #84

jmtimko5 opened this issue Sep 28, 2021 · 0 comments

Comments

@jmtimko5
Copy link

Hi there I am following the installation instructions exactly as they are in the documentation and importing the plugin crashes my build with the following error. I am unsure why, I am using all the version that are specified:

Plugin Version: 1.2.0
Chart.js: 3.4.0

Error

/Users/josephtimko/work/netspring/firewatch/node_modules/chart.js/dist/chart.js:1
TypeError: Cannot read property 'prototype' of undefined
    at TypedRegistry.isForType (/Users/josephtimko/work/netspring/firewatch/node_modules/chart.js/dist/chart.js:5883:74)
    at Registry._getRegistryForType (/Users/josephtimko/work/netspring/firewatch/node_modules/chart.js/dist/chart.js:6028:15)
    at /Users/josephtimko/work/netspring/firewatch/node_modules/chart.js/dist/chart.js:6008:39
    at Array.forEach (<anonymous>)
    at Registry._each (/Users/josephtimko/work/netspring/firewatch/node_modules/chart.js/dist/chart.js:6007:15)
    at Registry.add (/Users/josephtimko/work/netspring/firewatch/node_modules/chart.js/dist/chart.js:5964:10)
    at Function.value [as register] (/Users/josephtimko/work/netspring/firewatch/node_modules/chart.js/dist/chart.js:7220:16)
    at eval (webpack-internal:///./components/charts/chartDefaults.ts:40:48)
    at Module../components/charts/chartDefaults.ts (/Users/josephtimko/work/netspring/firewatch/.next/server/pages/_app.js:283:1)
    at __webpack_require__ (/Users/josephtimko/work/netspring/firewatch/.next/server/pages/_app.js:23:31)
error - /Users/josephtimko/work/netspring/firewatch/node_modules/chart.js/dist/chart.js:1
TypeError: Cannot read property 'prototype' of undefined
    at TypedRegistry.isForType (/Users/josephtimko/work/netspring/firewatch/node_modules/chart.js/dist/chart.js:5883:74)
    at Registry._getRegistryForType (/Users/josephtimko/work/netspring/firewatch/node_modules/chart.js/dist/chart.js:6028:15)
    at /Users/josephtimko/work/netspring/firewatch/node_modules/chart.js/dist/chart.js:6008:39
    at Array.forEach (<anonymous>)
    at Registry._each (/Users/josephtimko/work/netspring/firewatch/node_modules/chart.js/dist/chart.js:6007:15)
    at Registry.add (/Users/josephtimko/work/netspring/firewatch/node_modules/chart.js/dist/chart.js:5964:10)
    at Function.value [as register] (/Users/josephtimko/work/netspring/firewatch/node_modules/chart.js/dist/chart.js:7220:16)
    at eval (webpack-internal:///./components/charts/chartDefaults.ts:40:48)
    at Module../components/charts/chartDefaults.ts (/Users/josephtimko/work/netspring/firewatch/.next/server/pages/_app.js:283:1)
    at __webpack_require__ (/Users/josephtimko/work/netspring/firewatch/.next/server/pages/_app.js:23:31)
/Users/josephtimko/work/netspring/firewatch/node_modules/chart.js/dist/chart.js:1
TypeError: Cannot read property 'prototype' of undefined
    at TypedRegistry.isForType (/Users/josephtimko/work/netspring/firewatch/node_modules/chart.js/dist/chart.js:5883:74)
    at Registry._getRegistryForType (/Users/josephtimko/work/netspring/firewatch/node_modules/chart.js/dist/chart.js:6028:15)
    at /Users/josephtimko/work/netspring/firewatch/node_modules/chart.js/dist/chart.js:6008:39
    at Array.forEach (<anonymous>)
    at Registry._each (/Users/josephtimko/work/netspring/firewatch/node_modules/chart.js/dist/chart.js:6007:15)
    at Registry.add (/Users/josephtimko/work/netspring/firewatch/node_modules/chart.js/dist/chart.js:5964:10)
    at Function.value [as register] (/Users/josephtimko/work/netspring/firewatch/node_modules/chart.js/dist/chart.js:7220:16)
    at eval (webpack-internal:///./components/charts/chartDefaults.ts:40:48)
    at Module../components/charts/chartDefaults.ts (/Users/josephtimko/work/netspring/firewatch/.next/server/pages/_app.js:283:1)
    at __webpack_require__ (/Users/josephtimko/work/netspring/firewatch/.next/server/pages/_app.js:23:31)

Plugin Import Code This is effectively identical to that in the README, I am unsure what could be going wrong here

import { Chart, Interaction } from "chart.js";
import { defaults } from "react-chartjs-2";

import Color from "color";
import AnnotationPlugin from "chartjs-plugin-annotation";
import DataLabelsPlugin from "chartjs-plugin-datalabels";
import { CrosshairPlugin, Interpolate } from "chartjs-plugin-crosshair";

// Plugin Registration
Chart.register(AnnotationPlugin);
Chart.register(DataLabelsPlugin);
Chart.register(CrosshairPlugin);
Interaction.modes.interpolate = Interpolate;
@jmtimko5 jmtimko5 changed the title Installation Crashes Build Installation of 1.2.0 Crashes Build Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant