-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Labels
Bugthing that needs fixingthing that needs fixingPriority 1high priority issuehigh priority issueRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release
Description
Current Behavior:
When installing a module from npm, symlinks are created in node_modules/.bin/ for that dependency and any transitive dependencies.
When installing a module from a local directly, symlinks are created in node_modules/.bin/ for that dependency but not any transitive dependencies.
Expected Behavior:
Installing a module from a local directory should behave the same as installing from npm, i.e. should set up symlinks to all transitive dependencies of the module being installed.
Steps To Reproduce:
To reproduce, install the cowsay_quote module
cowsay_quotedepends oncowsay.cowsay_quotecreates the linkcowsayq.cowsaycreates the linkscowsayandcowthink.
To see expected behaviour (when installing module from npm):
mkdir working
cd working
npm install [email protected]
ls -al node_modules/.bin/ # has symlinks for cowsay_quote and all dependent modules recursively
npx cowsayq # works
npx cowsay # works
npx cowthink # worksTo see buggy behaviour (when installing module from local directory)
git clone https://github.com/maheshstms/cowsay-quote.git
cd cowsay-quote
git checkout 1b23026 # commit for 1.3.0, just to ensure we're doing something identical
npm install
cd ../
mkdir notworking
cd notworking
npm install ../cowsay-quote/
ls -al node_modules/.bin/ # only has symlinks for cowsay_quote
npx cowsayq # works
npx cowsay # offers to install module even though it should be installed
npx cowthink # not found
Environment:
- OS: Ubuntu 20.04 (in WSL 2)
- Node: 14.8.0
- npm: 7.10.0
Other
Note this may be related to #3081, but I believe it's a slightly different bug to the one reported there.
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingPriority 1high priority issuehigh priority issueRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release