qodesmith / datepicker

Get a date with JavaScript! A datepicker with no dependencies.
344 stars 101 forks source link

`Could not find a declaration file for module 'js-datepicker'.` #126

Closed catalin560 closed 2 years ago

catalin560 commented 2 years ago
Could not find a declaration file for module 'js-datepicker'. 'C:/Users/X/Documents/development/Y/node_modules/js-datepicker/dist/datepicker.min.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/js-datepicker` if it exists or add a new declaration (.d.ts) file containing `declare module 'js-datepicker';`ts(7016)

is there a easy fix for this to work with Typescript?

salodev commented 1 year ago

I see still missing @types/js-datepicker, tried npm i --save-dev @types/js-datepicker and get:

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@types%2fjs-datepicker - Not found
npm ERR! 404 
npm ERR! 404  '@types/js-datepicker@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/salomon/.npm/_logs/2023-03-04T13_58_43_204Z-debug.log
AbhiSmith commented 8 months ago

just run npm install --save @types/react-datepicker