https://github.com/zardoy/repro-typescript-linking
`npm link` problem
https://github.com/zardoy/repro-typescript-linking
Last synced: about 1 year ago
JSON representation
`npm link` problem
- Host: GitHub
- URL: https://github.com/zardoy/repro-typescript-linking
- Owner: zardoy
- License: mit
- Created: 2021-09-22T15:28:59.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-09-24T17:07:54.000Z (over 4 years ago)
- Last Synced: 2025-02-13T03:41:46.352Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://stackoverflow.com/questions/50010438/install-npm-local-module-directory-without-symlinks/50010667
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
# The Problem: TypeScript Linking
This repository demonstrates the issue of module resolution.
This repo uses NPM workspaces for the `source` dependency linking and `start` script for generating modules in both `consumer/node_modules` and `source/node_modules`.
That said, run `npm i && npm run start`, go to [consumer/index.ts](consumer/index.ts), hover types and you will see that TS already resolves types *incorrectly*.
And the most interesting part: try to comment first line and see how the uncommented type changes.
> PNPM workspaces note: Despite of that it uses different node_modules layout, the issue sill persists.