NPM publish/pack doesn't include content from symlinked directories on Windows
Asked Answered
O

0

7

NPM doesn't follow directory symbolic links, nor directory junctions. Is there some configuration or way to force NPM to include also files from such directories?

Minimal reproducible example. Folder structure:

hello/
├── foo/
│   └── foo.js
└── bar/
    ├── package.json
    ├── bar.js
    └── foo/ (SYMLINK)

Two types of symlinks doesn't work:

bar> mklink /J foo ..\foo
bar> mklink /D foo ..\foo

The pack command

bar> npm pack

produces the tar package without foo/foo.js and no foo/ folder.

$ npm -v
# 8.0.0
Originality answered 25/3, 2022 at 10:15 Comment(2)
Did you find any solution?Milford
@AlMahdi Unfortunately, no. But I havn't tried the symlinks for a while; things could have changed since then.Originality

© 2022 - 2024 — McMap. All rights reserved.