Vue-good-table: Error missing loadash.clone dependency

Created on 12 Oct 2018  路  9Comments  路  Source: xaksis/vue-good-table

Issue Type (delete the irrelevant ones)

  • [x] Bug
  • [ ] Enhancement Request
  • [ ] Question

Specs

What version are you using?
2.15.0

What browser?
Chrome (although the error is prior to web publish)

Expected Behavior

What did you expect to happen?
No error is outputed when compiling assets (I'm using Laravel) with npm run dev or npm run prod

Actual Behavior

What actually happened?
An error is outputed stating that loadash.clone dependency is not found:

 ERROR  Failed to compile with 1 errors                                                                                                                                                                    10:46:17

This dependency was not found:

* lodash.clone in ./node_modules/vue-good-table/dist/vue-good-table.es.js

To install it, you can run: npm install --save lodash.clone

Steps to Reproduce the Problem

Please detail your steps here

  1. Include vue-good-tables in app.js file with:

    import VueGoodTablePlugin from 'vue-good-table';
    
    Vue.use(VueGoodTablePlugin);
    
  2. Compile assets with npm run dev

Most helpful comment

looking into this.

All 9 comments

It seems that vue-good-table.es.js is still trying to import loadash.clone even when in version 2.15.0 was removed as a dependency.

Removing that line does the trick and the assets compile just fine.
image

But the component does not work in the Web Browser and the Console shows this error:

Uncaught ReferenceError: clone is not defined
    at Object.diacritics.a (app.js:31946)
    at __webpack_require__ (app.js:20)
    at Object.<anonymous> (app.js:1647)
    at __webpack_require__ (app.js:20)
    at Object.defineProperty.value (app.js:1635)
    at __webpack_require__ (app.js:20)
    at Object.defineProperty.value (app.js:63)
    at app.js:66

Looking deeper into this shows that loadash.clone is still being used by some source files, specifically in the types files:
image

So I agree with @lloydjatkinson that the commit broke things for the distributed js file.

For the time being, as a workaround, I'm adding "lodash.clone": "^4.5.0" to my packages.json file to include the missing dependency, but this needs to be fixed.

looking into this.

weird... dist still shows version 2.14.7 I'll republish with a patch to see if it updates.

I'm getting this error as well, in addition to the errors in my issue, after updating the package (2.15.0).

give npm a few minutes. 2.15.1 should be available with the fix:
https://github.com/xaksis/vue-good-table/blob/master/dist/vue-good-table.es.js

closing.

Removed the lodash.clone dependency, removed the lodash.clone folder from the node_modules, updated the npm modules and try to compile again and... it worked correctly!

Thanks for the awesome response time on this!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davidohlin picture davidohlin  路  6Comments

jannishuebl picture jannishuebl  路  3Comments

hoanghiep1x0 picture hoanghiep1x0  路  5Comments

mgd722 picture mgd722  路  7Comments

tverilytt picture tverilytt  路  6Comments