3.6.0 : warning compiled with 1 warning 4:12:23 pm warning in ./node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js "export 'default' (imported as 'yn') was not found in 'date-fns-tz'
See original GitHub issueDescribe the bug
After updating to version 3.6.0, datepicker makes my app fail to execute.
npm run serve
display a warning in the terminal :
WARNING Compiled with 1 warning
warning in ./node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js
"export 'default' (imported as 'Yn') was not found in 'date-fns-tz'
When I try to start the app in the browser, console displays this error :
vue-datepicker.js?5141:218 Uncaught TypeError: Cannot destructure property 'utcToZonedTime' of 'date_fns_tz__WEBPACK_IMPORTED_MODULE_2__.default' as it is undefined.
Proposal, search for solution
Seems the problem is located in this file date-fns-tz src/VueDatePicker/components/composables/utils.ts :
Line 22 to 24
import dateFnsTz from 'date-fns-tz';
const { utcToZonedTime, zonedTimeToUtc } = dateFnsTz;
The import statement refer to a module which has no export default
.
Import should probably be something like :
import { utcToZonedTime, zonedTimeToUtc } from 'date-fns-tz';
Temporary solution
Downgrading to 3.5.3 in my package.json
Issue Analytics
- State:
- Created 9 months ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Getting warnings for export 'default' (imported as 'mod ... - GitHub
My Fix: I moved all of my css to an actual css file instead of declaring it locally or scoped. This removed every...
Read more >Export default was not found - Stack Overflow
"What am I doing wrong?" You are trying to import the default export of a module which does not have a default export....
Read more >export 'link' (imported as 'link') was not found in 'react-router'
12 with Vue-Router 3.5.2. I am getting following error when I run command below: *npm run dev* WARNING in ./resources/js/components ...
Read more >date-fns-tz - npm
ESM and CommonJS. As of v1.3.0 this library supports native ESM imports in Node.js. It is important to use the proper import path...
Read more >Export and Import - The Modern JavaScript Tutorial
That's why there's no need for a semicolon at the end of export class and export function : export function sayHi(user) { alert(`Hello, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The fix is published and should be good now, let me know if the issue still persists.
Will publish a fix later today.