question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Jscroll extract problem

See original GitHub issue
  • Laravel Mix Version: 0.12.1 (npm list --depth=0)
  • Node Version (node -v): 6.10.3
  • NPM Version (npm -v): 3.10.10
  • OS: Debian

Description:

I want to extract jquery-jscroll into vendor.js and I have this error : jQuery.Deferred exception: $(…).jscroll is not a function [“./resources/assets/js/setup2.js”]/</<@http://172.20.0.3/js/setup2.min.20e168d1323c4340a794.js:12:1 resolve/</mightThrow@http://172.20.0.3/js/vendor.b9ca640f1a8e1fc82b13.js:6051:21 resolve/</process<@http://172.20.0.3/js/vendor.b9ca640f1a8e1fc82b13.js:6119:12 undefined

So jscroll is never imported.

Steps To Reproduce:

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:17 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
ruchernchongcommented, Jun 8, 2017

@gcrispyn Actually I do not know why you want to extract these libraries.

The best way to go around this is to add the packages into the app.js file.

Example: resources/assets/js/app.js

window.Ladda = require('ladda')

With this, Ladda will be inside app.js at compile and you will require 1 less request.

https://laravel.com/docs/5.4/mix#vendor-extraction

The only reason you may want to use extract is to split them up into 3 different js files. This will result in 2 extra http request when the browser is trying to load.

1reaction
gcrispyncommented, Jun 7, 2017

@ruchern I forgot to tell you that i needed to add : <script src="{{ mix('js/jquery.jscroll.js') }}"></script> in my view, and then it works

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jscroll extract problem · Issue #862 · laravel-mix ...
I want to extract jquery-jscroll into vendor.js and I have this error : jQuery.Deferred exception: $(...).jscroll is not a function [".
Read more >
I need to extract the panel of my JScrollPane
You get the component from the JViewport of the JScrollPane : Component c = scrollPane.getViewport().getView();.
Read more >
JScrollPane problems
The problem is, the center panel draws a picture based on user dimensions and the picture can get quite big, which draws partially...
Read more >
How To Implement an Infinite Scroll with Vue.js
Learn how to implement a simple infinite scroll for your Vue apps using vanilla JavaScript and fetching data from an API.
Read more >
Scroll down on a box, find an element that contains a given ...
For additional info, if it can help, when I do a Get Full Text it ... I also have a problem with it,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found