Open amisevsk opened 2 years ago
Issues go stale after 180
days of inactivity. lifecycle/stale
issues rot after an additional 7
days of inactivity and eventually close.
Mark the issue as fresh with /remove-lifecycle stale
in a new comment.
If this issue is safe to close now please do so.
Moderators: Add lifecycle/frozen
label to avoid stale mode.
/remove-lifecycle stale
Issues go stale after 180
days of inactivity. lifecycle/stale
issues rot after an additional 7
days of inactivity and eventually close.
Mark the issue as fresh with /remove-lifecycle stale
in a new comment.
If this issue is safe to close now please do so.
Moderators: Add lifecycle/frozen
label to avoid stale mode.
/remove-lifecycle stale
Is your enhancement related to a problem? Please describe
Some node projects rely on packages installed from npm/yarn, e.g.
gulp
. Currently, the UDI images used by default in workspaces do not necessarily have all required packages installed, and provide no easy means of installing them --npm install -g
in workspaces fails with a permissions error attempting to write to/usr/local/lib/node_modules
.Describe the solution you'd like
We probably don't want to pre-install every possible dependency in the container itself, but we can enable installing dependencies within workspaces by configuring
npm
andyarn
to use writeable directories:Then adding
PATH=$PATH:/projects/.node_modules_global/bin/:/projects/.yarn_global/bin/
should allow usingnpm install -g <package>
oryarn global add <package>
in workspaces.Describe alternatives you've considered
Alternatively, another writeable path, outside the shared
/projects
directory could be used. This would mean that installed modules do not use workspace storage, but also means that installed packages are lost when the workspace restarts.Additional context
Initially raised in https://github.com/eclipse/che/issues/21741