question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot find module 'moment-guess' or its corresponding type declarations.ts(2307)

See original GitHub issue

VSCode is showing this error:

Cannot find module 'moment-guess' or its corresponding type declarations.ts(2307)

with versions:

    "moment": "^2.27.0",
    "moment-guess": "^1.1.1",

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
apoorv-mishracommented, Nov 11, 2020

I see. Sorry for that. I wasn’t expecting it since I never mentioned or encouraged anywhere in the docs to use it as a module 😅

Based on discussions with fellow developers, I found that they were more comfortable using it as a CLI utility rather than as a module, therefore I decided to drop support for the latter(this also helped reduce the bundled size).

Anyways, I’ll keep the issue open as it might be later decided to add back the support to use moment-guess as a module. Till then, I would suggest you to downgrade it to 1.0.10 to avoid breaking your code. Unfortunately, you won’t be getting new features that way.

0reactions
W4G1commented, Jan 7, 2022

Still getting this error with version 1.2.4

Read more comments on GitHub >

github_iconTop Results From Across the Web

TS2307: Cannot find module 'moment'. · Issue #5486 - GitHub
I m having issue with importing moment in to my angular 8 project. Angular version = 8.3.26. Type script version = 3.6.2
Read more >
TypeScript error: Cannot find module 'moment' - Stack Overflow
Just a mistake in the import statement as it has been updated. As of version 2.13.0, Moment includes a typescript definition file. Install...
Read more >
Cannot find module 'moment' error | bobbyhadz
If you use TypeScript and are getting the error "Cannot find module 'moment' or its corresponding type declarations", make sure to update your...
Read more >
moment-timezone - npm
Start using moment-timezone in your project by running `npm i ... indicating that this package has built-in type declarations.
Read more >
Error: Cannot find module 'moment' or its corresponding type ...
I am creating Angular Material Datepicker using MatMomentDateModule. I got this error, how to resolve? ERROR in node_modules/@angular/material- ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found