You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 11, 2022. It is now read-only.
npm install <folder> will create a symlink to <folder> in the package directory
This can lead to unpredictable behavior and since there is a command for creating links npm link I believe npm install should always install the package.
Some possible problems that will break the installation:
Remove the origin package folder
Move the package elsewhere (e.g. install on a flash drive for use anywhere)
npm install
In global mode (ie, with -g or --global appended to the command), it installs the current package context (ie, the current working directory) as a global package.
But instead, it will create a link to the current folder as the package, which lead to the same problems described above.
If the original folder is removed, the package cannot even be installed again, since a broken link remain in bin dir.
How can the CLI team reproduce the problem?
Create or download a package which contain an executable in a folder (e.g. git clone https://github.com/paulodiovani/foaas-client)
Enter the folder: cd foaas-client
Install as global dependency: npm install -g
Remove folder: cd .. && rm -r foaas-client
Try to run the executable:
➜ foaas
zsh: command not found: foaas
supporting information:
➜ ~ npm -v
5.3.0
➜ ~ node -v
v8.4.0
➜ ~ npm config get registry
https://registry.npmjs.org/
➜ ~ uname -a
Linux paulodiovani-dell 4.12.9-1-zen #1 ZEN SMP PREEMPT Fri Aug 25 02:57:04 UTC 2017 x86_64 GNU/Linux
agirorn, fasergeyte, CodingNagger, Alexsey and gabrieldodan