Visual Studio cannot find Typescript declaration file 'source-map'

Open
#449 3 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
javascript
Domain
tooling

Research direction

Start by checking the typings entry in package.json and the referenced source-map.d.ts file. Reproduce the Visual Studio 2019 error, then verify that the package metadata lets TypeScript resolve the declaration file without the TS6053 error.

Written by the indexing model from the issue text.

Description

I'm getting this error in Visual Studio 2019 :

Error TS6053 File 'path-to-my-project/node_modules/source-map/source-map' not found.
The file is in the program because: Root file specified for compilation

The cause of this error seems to be this line in package.json:
"typings": "source-map",
If i change it to
"typings": "source-map.d.ts",
then everythings works fine.

Dominant language
JavaScript
Stars
3.7k
Forks
370
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mozilla/source-map

All issues in mozilla/source-map

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.