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

fix(typing): Could not find a declaration file for module 'ms'. #189

Open
jjangga0214 opened this issue Jul 24, 2022 · 2 comments
Open

fix(typing): Could not find a declaration file for module 'ms'. #189

jjangga0214 opened this issue Jul 24, 2022 · 2 comments

Comments

@jjangga0214
Copy link

jjangga0214 commented Jul 24, 2022

Hi!

I faced this issue.

Could not find a declaration file for module 'ms'. '/Users/ocean/main/haetae/node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/ms` if it exists or add a new declaration (.d.ts) file containing `declare module 'ms';`ts(7016)

스크린샷 2022-07-24 오후 3 41 59

Currently, my project is written in typescript and to be compiled to CJS.

Reproduction

$ git clone git@github.com:jjangga0214/haetae.git
$ cd haetae 
$ git reset --hard 5e8e501
$ pnpm install
$ cd packages/core
$ vi src/index.ts # And then remove @ts-ignore from the source file
$ pnpm tsc --noEmit

Info

  • os: macOS 12.4
  • node: 16.13.1
  • pnpm: 7.5.1

Thanks!

@jjangga0214 jjangga0214 changed the title fix: Could not find a declaration file for module 'ms'. fix(typing): Could not find a declaration file for module 'ms'. Jul 24, 2022
@SpencerDuball
Copy link

Per the documentation it looks like typescript typings are available after version 3.0.0. Currently, 3.0.0-canary.1 and 3.0.0-canary.0 are available but not downloaded by default. If you want typescript typings out of the box you can run this command now, or wait for the canary to become the latest main version:
yarn add ms@3 or npm i ms@3.0.0-canary.1

@vighnesh153
Copy link

Any tentative date for the release of v3?

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