I posted similar question, if only people would response :/
Feb 5, 2017
17
Level 1
Laravel Mix - Required jQuery plugins can't be found
I attempting to use require to include some Javascript plugins for my project, but for some reason, the plugins simply can't be found by the browser.
My resources/assets/js/bootstrap.js and resources/assets/js/app.js files when "compiled" with npm run dev include all the scripts I need, but when running the project in the browser, it simply wont work.
These are my bootstrap.js and app.js:
window._ = require('lodash');
/**
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
* for JavaScript based Bootstrap features such as modals and tabs. This
* code may be modified to fit the specific needs of your application.
*/
window.$ = window.jQuery = require('jquery');
require('bootstrap-sass');
/**
* Vue is a modern JavaScript library for building interactive web interfaces
* using reactive data binding and reusable components. Vue's API is clean
* and simple, leaving you to focus on building your next great project.
*/
window.Vue = require('vue');
/**
* We'll load the axios HTTP library which allows us to easily issue requests
* to our Laravel back-end. This library automatically handles sending the
* CSRF token as a header based on the value of the "XSRF" token cookie.
*/
window.axios = require('axios');
window.axios.defaults.headers.common = {
'X-CSRF-TOKEN': window.Laravel.csrfToken,
'X-Requested-With': 'XMLHttpRequest'
};
/**
* Let's load Full Calendar
*/
require('fullcalendar');
require('./bootstrap');
require('./bootstrap-checkbox-radio-switch')
require('./chartist.min')
require('./bootstrap-notify')
require('./bootstrap-select')
require('./maps')
require('./demo')
Fr example, when I use fullCalendar, I get the following error:
Uncaught TypeError: $(...).fullCalendar is not a function
I simply have no idea how to make these plugins take effect.
Help would be appreciated.
Please or to participate in this conversation.