nathanreyes / v-calendar

An elegant calendar and datepicker plugin for Vue.

Home Page:https://vcalendar.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dependency was not found error

heash0000 opened this issue · comments

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?

Re install it, and use plugins instead

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

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

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

Going back to 2.4.1 fixed this for me.

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?