nathanreyes / v-calendar

An elegant calendar and datepicker plugin for Vue.
https://vcalendar.io
MIT License
4.32k stars 840 forks source link

Dependency was not found error #1423

Open heash0000 opened 6 months ago

heash0000 commented 6 months ago

If you install the web anew and proceed with the npm installation and proceed with the npm run build, the following problems occur.

image

If you proceed with npm run build with the node_modules folder that you previously installed, there is no problem.

The npm install --save v-calendar/lib/components/date-picker.umd also causes problems. image

What should I do?

shubzz2110 commented 6 months ago

Re install it, and use plugins instead

heash0000 commented 6 months ago

I've already reinstalled it a few times, but the same problem occurs. The same problem occurs in the new environment. The v-calendar version I use has been in the same environment as before, but this problem has occurred.

After checking the installed node_modules/v-calendar, we found that the configuration was different from the previous one. Existing v-calendar had components folder, but not newly installed v-calendar.

Before image

Recently image

vascofbribeiro commented 6 months ago

I had the same problem after updating from 2.4.1 -> 2.4.2 although after looking at the changes from the previous version I don't see anything that could affect /.lib folder generation. A workaround, for now, is to import specifically DatePicker or other components from 'v-calendar/lib/v-calendar.umd' on your files

import { DatePicker } from 'v-calendar/lib/v-calendar.umd'

If this is the new way to go then the documentation should be changed: https://v2.vcalendar.io/installation.html

heash0000 commented 6 months ago

Thank you for your response. First of all, I'll have to use version 2.4.1.

rkhandev commented 6 months ago

Going back to 2.4.1 fixed this for me.

leodip commented 5 months ago

I'm having the same issue. My code has:

import DatePicker from 'v-calendar/lib/components/date-picker.umd';

When I upgrade from 2.4.1 to 2.4.2, I get:

Module not found: Error: Can't resolve 'v-calendar/lib/components/date-picker.umd'

The documentation needs to be updated because this import statement doesn't work anymore in version 2.4.2.

What's the correct way to import the DatePicker component?