Vuepic / vue3-date-time-picker

Datepicker component for Vue 3
https://vue3datepicker.com
MIT License
159 stars 12 forks source link

Issue using the component in a Vue 3 application #35

Closed N37d7W closed 3 years ago

N37d7W commented 3 years ago

Describe the bug Having issues adding this component to my application. Here's the error I'm receiving on compile:

error in ./node_modules/vue3-date-time-picker/dist/vue3-date-time-picker.esm.js

Module parse failed: Unexpected token (1:92573) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

I have css-loader, sass, sass-loader, style-loader, vue-style-loader etc. all installed in my package.json. I'm currently running Vue 3.2.6. I'm using a vue.config.js file, not sure if I need to register these loaders here, but I thought there were no dependencies on this package.

To Reproduce Just npm installed and added the module into one of my Vue components. On compile, I receive the above error, as well as the entirety of the js file text. Not sure if a bug or I'm installing this wrong, but I am stumped here. Thanks!

Jasenkoo commented 3 years ago

Tnx for reporting this issue. Looks like the issue is in the last version, built with node 16.

For now, use version 2.3.1 and you should be able to start the project without issues, I will take a look at this for the next deployment.

N37d7W commented 3 years ago

Worked for me, looks to be fully functional in 2.3.1 in my application, thanks!

N37d7W commented 3 years ago

Just removed my node_modules and tried to re-install from my package.json. In the package, I have vue3-date-time-picker set to 2.3.1. However, on npm install, the same error message as above pops up. Running an npm install vue3-date-time-picker@2.3.1 manually again fixed the issue. Would you have any idea what's going on here? Thanks again.

Jasenkoo commented 3 years ago

Will fix the issue in the next version. I can't say for sure what is causing it

Jasenkoo commented 3 years ago

The issue is fixed in the new version 2.3.3