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

[BUG] Cannot find module 'moment' or its corresponding type declarations.(2307) #28

Open
DavraYoung opened this issue Dec 19, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@DavraYoung
Copy link

DavraYoung commented Dec 19, 2022

Describe the bug
Some libraries are now resolved correctly, for example: moment

To Reproduce

  1. Go to playground and insert:
import moment from 'moment'
  1. watch how libraries are correctly resolved in log sidebar
  2. see typescript still complaining that he cannot find modules
  3. see typescript cast all usages of such imports to any

Expected behavior
I expect typescript to resolve them correctly and not complain.

Screenshots
image
image

Environment (please complete the following information):

"monaco-editor": "0.34.0",
"monaco-editor-auto-typings": "^0.4.3",
"monaco-editor-webpack-plugin": "^7.0.1",
  • OS: Windows

  • Browser Version: Version 108.0.5359.125 (Official Build) (64-bit)

  • monaco-editor-auto-typings Version: "^0.4.3"

Additional context
I am using custom compiler options:

languages.typescript.typescriptDefaults.setCompilerOptions({
  ...languages.typescript.typescriptDefaults.getCompilerOptions(),
  moduleResolution: 2,
  isolatedModules: false,
  allowSyntheticDefaultImports: true,
})
@DavraYoung DavraYoung added the bug Something isn't working label Dec 19, 2022
@DavraYoung DavraYoung changed the title [BUG] Short description of your problem [BUG] Cannot find module 'moment' or its corresponding type declarations.(2307) Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants