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

Uncaught TypeError: Cannot set property '$chartist' of undefined at Object.exports.install #57

Open
zair07 opened this issue Feb 10, 2021 · 2 comments

Comments

@zair07
Copy link

zair07 commented Feb 10, 2021

This is my main.js

import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import Vuex from 'vuex'

import axios from 'axios'
import VueAxios from 'vue-axios'

const app = createApp(App)
app.use(Vuex)
app.use(router)
app.use(VueAxios, axios)
app.use(require('vue-chartist'))
app.mount('#app')

Also tried import Chartist again same error

I have included these js and css in index.html

<link href="<%= BASE_URL %>assets/libs/chartist/dist/chartist.min.css" rel="stylesheet">
<script src="<%= BASE_URL %>assets/libs/chartist/dist/chartist.min.js"></script>
<script src="<%= BASE_URL %>assets/libs/chartist-plugin-tooltips/dist/chartist-plugin-tooltip.min.js"></script>

Also tried without these files still same error

Full error

DevTools failed to load SourceMap: Could not load content for http://localhost:8080/assets/libs/popper-js/dist/umd/popper.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/dist/js/feather.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
log.js?1afd:24 [HMR] Waiting for update signal from WDS...
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/assets/libs/chartist/dist/chartist.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/assets/libs/chartist-plugin-tooltips/dist/chartist-plugin-tooltip.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
index.js?84b5:10 Uncaught TypeError: Cannot set property '$chartist' of undefined
    at Object.exports.install (index.js?84b5:10)
    at Object.use (runtime-core.esm-bundler.js?5c40:2945)
    at eval (main.js?56d7:13)
    at Module../src/main.js (app.js:1234)
    at __webpack_require__ (app.js:854)
    at fn (app.js:151)
    at Object.1 (app.js:1319)
    at __webpack_require__ (app.js:854)
    at checkDeferredModules (app.js:46)
    at app.js:994
exports.install @ index.js?84b5:10
use @ runtime-core.esm-bundler.js?5c40:2945
eval @ main.js?56d7:13
./src/main.js @ app.js:1234
__webpack_require__ @ app.js:854
fn @ app.js:151
1 @ app.js:1319
__webpack_require__ @ app.js:854
checkDeferredModules @ app.js:46
(anonymous) @ app.js:994
(anonymous) @ app.js:997
@ercag
Copy link

ercag commented Jan 3, 2022

hi, i faced this problem and i just downgrade the version.
"vue-chartist": "3.0.0" to "vue-chartist": "^2.3.1"

@SPganiie
Copy link

SPganiie commented Jan 4, 2022

hi, i faced this problem and i just downgrade the version. "vue-chartist": "3.0.0" to "vue-chartist": "^2.3.1
thx for alot bro @ercag .helpfull for me

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

3 participants