vkurko / calendar

Full-sized drag & drop JavaScript event calendar with resource & timeline views
https://vkurko.github.io/calendar/
MIT License
964 stars 82 forks source link

Can't import event calendar #214

Closed alka7ex closed 5 months ago

alka7ex commented 5 months ago

Hi Team I would like to ask some help or advise, i was got an error where i try to setup the @event-calendar for my project here is the error

Code_isOb0doPAh

Could not find a declaration file for module '@event-calendar/day-grid'. '/home/haikal/grorental/svelte/p2/project1/node_modules/@event-calendar/day-grid/index.js' implicitly has an 'any' type. Try npm i --save-dev @types/event-calendar__day-grid if it exists or add a new declaration (.d.ts) file containing declare module '@event-calendar/day-grid';ts(7016)

vkurko commented 5 months ago

Instead of import type you should use just import:

import Calendar from '@event-calendar/core';
import TimeGrid from '@event-calendar/time-grid';
alka7ex commented 5 months ago

Hi @vkurko Thank you for your response, i actually was trying it also but i had different error now here is the screenshot.

XnauBxyxBZ QSDMLWe2oj brave_KL6Kbmafc4
vkurko commented 5 months ago

Did you npm install --save-dev @event-calendar/time-grid?

alka7ex commented 5 months ago

Yes, i already install it, here is my npm list image image

vkurko commented 5 months ago

There is really no support for TypeScript right now, that is, there is no declaration file. But this should not prevent you from using the library in TypeScript.

The error indicates that for some reason the @event-calendar/time-grid package is not available. I have no idea yet why this is happening for you.

alka7ex commented 5 months ago

Hi @vkurko some how it's works now but yes it still complaining about typescript, i believe it should be works from the start, but i was distracted by the types complain, and didn't check it properly, sorry about it. and thank you for willing to answer my questions

image image image