0

I created a react app using react-create-app. Now I am not able to import external js and bootstrap files.

index.js
import './assets/css/style.css';
import './assets/css/bootstrap-social.css';
import './assets/css/bootstrap.css';
import './assets/css/responsive.css';
import './assets/css/theme-default.css';
import './assets/css/jquery-ui.css';
import './assets/css/main.css';
import './assets/css/font-awesome.css';
// const $ = require('./assets/js/jquery.min.js');
// global.jQuery = $
// const app = require('./assets/js/bootstrap.min.js');

I have purchased s theme. Not I want to install external jquery and bootstrap. Note: css import working fine.

m00am
  • 5,910
  • 11
  • 53
  • 69
  • maybe this could help? https://stackoverflow.com/questions/48069504/in-create-react-app-adding-bootstrap-4 – Kunukn Mar 07 '18 at 11:34
  • here is my index.js code
    import './assets/css/style.css';
    import './assets/css/bootstrap-social.css';
    import './assets/css/bootstrap.css';
    import './assets/css/responsive.css';
    import './assets/css/theme-default.css';
    import './assets/css/jquery-ui.css';
    import './assets/css/main.css';
    import './assets/css/font-awesome.css';
    
    const $ = require('jquery');
    // global.jQuery = $
    // const app = require('./assets/js/bootstrap.min.js');
    
    i have purchased theme. not want to install external jquery and bootstrap. Note: css import working fine.
    – Pankaj Kumar Mar 07 '18 at 11:38
  • 1
    edit your question and add the above data into that – Sujit.Warrier Mar 07 '18 at 11:47
  • here is my index.js code `import './assets/css/style.css'; import './assets/css/bootstrap-social.css'; import './assets/css/bootstrap.css'; import './assets/css/responsive.css'; import './assets/css/theme-default.css'; import './assets/css/jquery-ui.css'; import './assets/css/main.css'; import './assets/css/font-awesome.css'; //const $ = require('./assets/js/jquery.min.js'); // global.jQuery = $ // const app = require('./assets/js/bootstrap.min.js');` i have purchased theme. not want to install external jquery and bootstrap. Note: css import working fine. – Pankaj Kumar Mar 07 '18 at 11:57
  • Welcome to SO. I edited your question to incorporate the information you added in the comments (please check if I got everything right). You can do that by using the edit button below the question. Please also add the following information to your question: Where exactly are you stuck? Do you get an error message? If so, please add it to the question. – m00am Mar 07 '18 at 13:21
  • ok guys. i found the solution. I updated my package.json packages to its latest version and its working fine. – Pankaj Kumar Mar 13 '18 at 05:36

0 Answers0