Giter VIP home page Giter VIP logo

Comments (7)

falloutghost avatar falloutghost commented on July 25, 2024

Apparently Vue fails to instantiate the plugin, this is where the TypeError: plugin.apply is not a function error happens:

Vue.use = function (plugin) {
    /* istanbul ignore if */
    if (plugin.installed) {
      return;
    }
    // additional parameters
    var args = toArray(arguments, 1);
    args.unshift(this);
    if (typeof plugin.install === 'function') {
      plugin.install.apply(plugin, args);
    } else {
      plugin.apply(null, args);
    }
    plugin.installed = true;
    return this;
  };

Maybe I'm registering it wrong?

from vue-tables.

falloutghost avatar falloutghost commented on July 25, 2024

Having a look at the fiddle (https://jsfiddle.net/matfish2/f5h8xwgn/) helped, I missed the .client part:

var VueTables = require('vue-tables');
Vue.use(VueTables.client);

Sorry.

from vue-tables.

EmilMoe avatar EmilMoe commented on July 25, 2024

I have same problem

from vue-tables.

matfish2 avatar matfish2 commented on July 25, 2024

Did you read the comments of @falloutghost?

from vue-tables.

gbdematos avatar gbdematos commented on July 25, 2024

+1 Same exact problem... I read the comments of @falloutghost, but didn't work.

var VueTables = require('vue-tables'); Vue.use(VueTables.client);

Still, same error:

[16:25:52] gulp-notify: [Laravel Elixir] Browserify Failed!: Cannot find module 'stringify' from 'S:\host\node_modules\vue-tables'

from vue-tables.

matfish2 avatar matfish2 commented on July 25, 2024

I am using elixir myself with no issues.
You need to (a) install stringify and (b) tell elixir to use it
Taken from my gulp file:
mix.browserify(['../test.js'],'public/test.min.js', null, {transform: 'stringify'});

from vue-tables.

nateritter avatar nateritter commented on July 25, 2024

I know this is old, but FWIW, I'm using Laravel Spark (v2) and found this to work:

yarn add stringify (or npm install stringify)
yarn add vue-tables

Then in /resources/assets/js/app.js register like so:

import VueTables from 'vue-tables';
Vue.use(VueTables.client);

And finally in the gulpfile.js be sure to add the transform into browserify...

elixir(function(mix) {
  mix.less('app.less')
...
  .browserify('app.js', null, null, {transform: 'stringify'})
...
});

YMMV

from vue-tables.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.