matteobruni / particles.vue

MIT License
11 stars 1 forks source link

Throws error when used with Nuxt.js #31

Closed Bearfinn closed 4 years ago

Bearfinn commented 4 years ago

I'm trying to use particles.vue in a fresh Nuxt project but it does not work and shows a lot of errors.

Reproduction Steps

  1. Install Nuxt with command yarn create nuxt-app app-name
  2. Install Particles.vue with command yarn add particles.vue
  3. Run Nuxt with yarn dev

The following error is thrown:

These dependencies were not found:                                                           
* core-js/modules/es6.array.find in ./.nuxt/client.js                                       
* core-js/modules/es6.array.from in ./.nuxt/client.js, ./.nuxt/components/nuxt-link.client.js 
* core-js/modules/es6.array.iterator in ./.nuxt/client.js                                     
* core-js/modules/es6.date.to-string in ./.nuxt/client.js, ./.nuxt/components/nuxt-link.client.js
* core-js/modules/es6.function.name in ./.nuxt/client.js, ./.nuxt/components/nuxt-link.client.js
* core-js/modules/es6.object.assign in ./.nuxt/client.js                             
* core-js/modules/es6.object.keys in ./.nuxt/client.js                                     
* core-js/modules/es6.object.to-string in ./.nuxt/client.js, ./.nuxt/components/nuxt-link.client.js and 1 other
* core-js/modules/es6.promise in ./.nuxt/client.js                                         
* core-js/modules/es6.regexp.constructor in ./.nuxt/utils.js                                 
* core-js/modules/es6.regexp.match in ./.nuxt/client.js                                   
* core-js/modules/es6.regexp.replace in ./.nuxt/utils.js, ./.nuxt/components/nuxt.js      
* core-js/modules/es6.regexp.search in ./.nuxt/utils.js                                
* core-js/modules/es6.regexp.split in ./.nuxt/utils.js                                   
* core-js/modules/es6.regexp.to-string in ./.nuxt/client.js, ./.nuxt/components/nuxt-link.client.js
* core-js/modules/es6.string.includes in ./.nuxt/client.js, ./.nuxt/components/nuxt-link.client.js
* core-js/modules/es6.string.iterator in ./.nuxt/client.js, ./.nuxt/components/nuxt-link.client.js
* core-js/modules/es6.string.repeat in ./.nuxt/utils.js                   
* core-js/modules/es6.string.starts-with in ./.nuxt/utils.js                     
* core-js/modules/es6.symbol in ./.nuxt/client.js, ./.nuxt/components/nuxt-link.client.js     
* core-js/modules/es7.array.includes in ./.nuxt/client.js, ./.nuxt/components/nuxt-link.client.js
* core-js/modules/es7.object.get-own-property-descriptors in ./.nuxt/index.js    
* core-js/modules/es7.promise.finally in ./.nuxt/client.js   
* core-js/modules/es7.symbol.async-iterator in ./.nuxt/client.js, ./.nuxt/components/nuxt-link.client.js
* core-js/modules/web.dom.iterable in ./.nuxt/client.js, ./.nuxt/components/nuxt-link.client.js
Error from chokidar (D:\git\secplayground): Error: UNKNOWN: unknown error, lstat

Build information

issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.61. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

matteobruni commented 4 years ago

Hello @Bearfinn

I’ll have a look on the core-js dependency, it seems a lot of people have the same issue with core-js dependency used in nuxt and probably this package doesn’t need it.

Somebody solved the issue adding core-js to their project, try installing core-js to see if it solved the issue.

Let me know, if I find a solution first I’ll post it

Bearfinn commented 4 years ago

I tried installing core-js with yarn add core-js@3.6.5, which is the same version installed by this Particles.vue library, but the problem still persists.

From what I understand, it seems like something tries to find the module in the wrong location. I tried uninstalling Particles.vue and the error messages did not appear. If more information is needed, please let me know.

matteobruni commented 4 years ago

I reproduced the issue, Nuxt.js seems incompatible with core-js@3.x

I removed the core-js dependency from particles.vue, it doesn't need it.

I published now 1.15.2 that should fix the issue

Bearfinn commented 4 years ago

I have tried and it works wonderfully now. Thank you for your prompt response! 😀