[NPMCLI-5] Investigate, improvement of npm link Created: 05/Apr/16  Updated: 22/Aug/16  Resolved: 12/May/16

Status: Closed
Project: Magnolia CLI
Component/s: None
Affects Version/s: None
Fix Version/s: 0.0.1

Type: Bug Priority: Critical
Reporter: Tomáš Gregovský Assignee: Unassigned
Resolution: Outdated Votes: 0
Labels: npm
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
depends upon NPMCLI-10 Refactor initial code Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Story Points: 3

 Description   

sometimes, when bins are already linked to be executed in command line. when doing new cli installation with new 'sudo npm link' then sometimes it fails because of permissions, and to move over these linked script has to manually removed from /usr/... folder

better understanding how they are linked and if we need to re-link them with every new cli installation will help. then if they have to be re-linked we will need probably some permission check or 'remove them first' step... or ?



 Comments   
Comment by Maxime Michel [ 15/Apr/16 ]

My investigation in DEV-190 has led me to to an interesting solution to this problem in npm linklocal. In my experience it solves that problem perfectly, and it's very actively used. More details:

Comment by Federico Grilli [ 15/Apr/16 ]

As far as I can see, there's no need to run npm link (at least that is redundant), because upon install all scripts specified in the bin field of package.json are automatically symlink see https://docs.npmjs.com/files/package.json#bin

Comment by Maxime Michel [ 18/Apr/16 ]

Should we close this one? fgrilli

Comment by Federico Grilli [ 18/Apr/16 ]

mmichel I would still investigate what happens to the bin scripts upon updating a package. That part is still a mystery to me.

Generated at Mon Feb 12 04:45:36 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.