darrenfang / vuetify-datetime-picker

DatetimePicker component for Vuetify.js. https://darrenfang.github.io/vuetify-datetime-picker/
MIT License
175 stars 127 forks source link

Error when installing in vite project #104

Closed Mosaab-Emam closed 2 years ago

Mosaab-Emam commented 2 years ago

Problem:

If the package is installed in a project using vite instead of vue/cli, the following error arises when starting the dev server:

✘ [ERROR] Could not resolve "./components/DatetimePicker"

    node_modules/vuetify-datetime-picker/src/index.js:26:27:
      26 │ import DatetimePicker from './components/DatetimePicker'
         ╵                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Environment details:

sureshvv commented 2 years ago

You need to specidy the .vue extension.

Try to change it as follows:

import DatetimePicker from './components/DatetimePicker.vue'
Mosaab-Emam commented 2 years ago

Thanks for the clarification. I might not be able to test this myself as it is not relevant to me anymore, but it is much appreciated none the less. Will be closing this issue.