0

i am getting error Cannot set properties of undefined (setting 'bootstrap') while adding this file into App.vue. it's before i keep that code in index.html file where i was not getting any error but slimscroll.min.js and some other file code was not working. i do not know what was problem. all files was being load and has 200 status code when i checked in inspect view of Network tab. so after that i putting this all files into App.js then getting this error. I was looking this problem in everywhere but not getting any solution. can anyone tell me why i am getting error?

<script >
   import   "./assets/js/vendor/jquery-2.2.4.min.js";
   import   "./assets/js/bootstrap.min.js";
   import   "./assets/js/popper.min.js";
   import   "./assets/js/owl.carousel.min.js";
   import   "./assets/js/metisMenu.min.js";
   import   "./assets/js/jquery.slimscroll.min.js";
   import   "./assets/js/jquery.slicknav.min.js";
   import   "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.min.js";
   import "https://code.highcharts.com/highcharts.js";

   import "./assets/js/line-chart.js" ;
   import  "./assets/js/pie-chart.js";
   import  "./assets/js/plugins.js";
   import  "./assets/js/scripts.js";

import {  RouterView } from 'vue-router'
</script>

<template>
  <RouterView />
</template>

enter image description here

6
  • Do you use Bootstrap or Bootstrap-Vue? Commented Oct 24, 2022 at 14:22
  • ok but there several files have same issue. Commented Oct 24, 2022 at 14:25
  • That does not answer my question. Also, why do you manually import local files rather than using NPM packages? Commented Oct 24, 2022 at 14:30
  • i installed Jquey by this npm install jquery --save-dev and imported in my app.js file but still same issue . Cannot read properties of undefined (reading 'jQuery') Commented Oct 24, 2022 at 14:47
  • Let's focus and not mix everything from the beginning. This may be a way to make jQuery work in your codebase. Even tho, I'm not sure why you would need jQuery at all since you're using Vue. Can you get rid of it? Then, what do you use Bootstrap, or Bootstrap-Vue? Finally, can you use NPM rather than inline imports? Please give me some feedback on the first point and answer to the other 3 questions in your next comment(s) to it to be efficient debugging-wise. Commented Oct 24, 2022 at 14:53

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.