Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find a declaration file for module 'ical.js' #719

Closed
UMURKAYALI opened this issue Jun 24, 2024 · 2 comments
Closed

Could not find a declaration file for module 'ical.js' #719

UMURKAYALI opened this issue Jun 24, 2024 · 2 comments

Comments

@UMURKAYALI
Copy link

I can't add the ical.js to my project.

I followed these steps in "https://www.npmjs.com/package/ical.js"

I'm getting this error:

 Could not find a declaration file for module 'ical.js'. '...../node_modules/ical.js/build/ical.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/ical.js` if it exists or add a new declaration (.d.ts) file containing `declare module 'ical.js';`

5 import ICAL from 'ical.js'; 

My project details:
Angular CLI: 16.2.14
Node: 18.20.2
Package Manager: npm 10.5.2
OS: darwin arm64

@jannikac
Copy link
Contributor

Hi, type generation has just been merged but its not included in a release yet which is why you get the error when installing the package from npm. If you need the types already you can create a package from the current master branch however the master branch is not guaranteed to be stable:

  1. Clone the master branch git clone https://github.com/kewisch/ical.js.git
  2. Install dependencies npm i
  3. Build the library npm run build
  4. Create a tarball npm pack
  5. Copy the tarball to your project and reference it in your package.json like this:
"dependencies": {
    "ical": "file:/path/to/ical.js-2.0.1.tgz"
  },
  1. Install it to your project with npm i

@kewisch
Copy link
Owner

kewisch commented Jul 4, 2024

I'm going to close this one out, there is one more issue @jannikac wants to work out, then we can spin a release. Thanks for checking in with us!

@kewisch kewisch closed this as not planned Won't fix, can't repro, duplicate, stale Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants