Symlinked node_modules directory confuses dts-bundle-generator
See original GitHub issueI have to admit, this is probably a quite uncommon use case, but still wanted to report it because maybe it can be fixed easily.
This is based on the same example as #37. Rename your node_modules directory and symlink it:
mv node_modules .node_modules_develop
ln -s .node_modules_develop node_modules
Then extract the typings. You will get a huge definitions file with a lot of inlined types. It seems like the symlink is confusing the logic that figures out how to deal with a dependency.
I’ve been using the symlink for a long time now as a technique to make it easy and fast to switch between the modules required for my develop and release branches. It hasn’t caused any problems with NPM itself or other tools so far.
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (8 by maintainers)
Top Results From Across the Web
dts-bundle-generator - npm
Start using dts-bundle-generator in your project by running `npm i ... (EXPERIMENTAL) Disables resolving of symlinks to the original path.
Read more >Building an NPM Package - Notes, Tips, and Troubleshooting
NodeJS Docs: "Loading from node_modules folder" (explains module resolution algorithm). Here is the creator, (and founder + former CEO) of NPM, ...
Read more >homebrew-core - Homebrew Formulae
a2ps 4.14 Any‑to‑PostScript filter
aacgain 1.8 AAC‑supporting version of mp3gain
aalib 1.4rc5 Portable ASCII art graphics library
aamath 0.3 Renders mathematical expressions as ASCII art
Read more >Bug listing with status UNCONFIRMED as at 2022/12/24 17 ...
symlinks " status:UNCONFIRMED resolution: severity:enhancement ... Bug:382827 - "sys-apps/portage-2.1.10.11 crashes with confusing error when out of memory: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, of course. Create a new directory. Place these files:
app.ts
package.json
tsconfig.json
Run
npm install
Runnpm run typings
, look at console output and the generated typings file which look like they should.Move the
node_modules
directory and symlink it:Run
npm run typings
again, this time the console has a lot of output and the typings file contains typings fromes2015
anddom
.Version 1.6.0 is published.