Scoop: I think npm global packages should be installed in it's own directory

Created on 16 Jan 2017  ·  10Comments  ·  Source: lukesampson/scoop

Dear @lukesampson

Thanks for this really awesome tool, it really ease my daily workflow a lot

Because right now using npm -g install ... will install the packages into the versioning directory of nodejs, therefore when upgrading nodejs, we have to reinstall the packages, it's not so bad right now but would be much better not to re-install anything after upgrading

Cheers

pending-release

All 10 comments

I wonder if removing https://github.com/lukesampson/scoop/blob/master/bucket/nodejs.json#L18 would do the trick. Perhaps we would also need to add an environment variable to tell npm to look in ~/appdata/roaming/npm as well.

Are there any Node experts listening that can help with this?

Also, I think @rrelmy is looking at adding special conf directories that would be maintained between updates (see #1185). So that might help with this in the long term.

I believe you can set the prefix for where packages get installed.

On Tue, 17 Jan 2017, 18:26 Luke Sampson notifications@github.com wrote:

I wonder if removing
https://github.com/lukesampson/scoop/blob/master/bucket/nodejs.json#L18
would do the trick. Perhaps we would also need to add an environment
variable to tell npm to look in ~/appdata/roaming/npm as well.

Are there any Node experts listening that can help with this?

Also, I think @rrelmy https://github.com/rrelmy is looking at adding
special conf directories that would be maintained between updates (see

1185 https://github.com/lukesampson/scoop/issues/1185). So that might

help with this in the long term.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/lukesampson/scoop/issues/1220#issuecomment-273040831,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA0Qgj7TyHHC2Rn10VjajAAC4aHd8H_8ks5rTG0ygaJpZM4Lk0Qa
.

I created a .npmrc file in my C:\Users\{me} directory with this content:

prefix=C:\bin\nodejs
cache=C:\bin\nodejs\npm-cache

I think using appdata for the packages leads to problems like #847

Using a dedicated data directory inside scoop maybe the best idea.
There could be everything version independ like the npm packages or the php config.

I couldn't start with the change from #1185, but I can do it this evening.

Do mysql and mariadb suffer from the same problem?

Looking way back at #126 and an aborted attempt at a similar thing, it looks like MariaDB, Vagrant, Nginx and Apache suffer from similar problems and would benefit.

@deevus actually suggested a scoop/data/app directory which looks very similar to the new plan. (Sorry I dismissed that idea, dude).

I guess this is not just about configuration, or data, so maybe we could call it "backpack", i.e. ~/scoop/backpack/[app] since it's just the things you take with you when go to a new version. Too cheesy?

I won't hold it against you.

On Wed, 18 Jan 2017, 09:37 Luke Sampson notifications@github.com wrote:

Looking way back at #126 https://github.com/lukesampson/scoop/issues/126
and an aborted attempt at a similar thing, it looks like MariaDB, Vagrant,
Nginx and Apache suffer from similar problems and would benefit.

@deevus https://github.com/deevus actually suggested a scoop/data/app
directory which looks very similar to the new plan. (Sorry I dismissed that
idea, dude).

I guess this is not just about configuration, or data, so maybe we could
call it "backpack", i.e. ~/scoop/backpack/[app] since it's just the
things you take with you when go to a new version. Too cheesy?


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
https://github.com/lukesampson/scoop/issues/1220#issuecomment-273323309,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA0QghV5F2HnamWa8M9B4EYPBBiig7byks5rTULHgaJpZM4Lk0Qa
.

Yes, that's ok

I was right now reading that up and looking at your travel_dir proposal but you were faster. ;-)

The _UNIX_ way would be separate directories for config etc/$app and data lib/$data.

But the backpack should be enough for us

I just really have time to try out, the .npmrc solution suggested by @inosik is working just great

Thanks all

I think it would be a nice default though if packages like Node.js would install their own packages into a special directory. 👍

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bernstein82 picture bernstein82  ·  3Comments

nitrocode picture nitrocode  ·  3Comments

borekb picture borekb  ·  3Comments

mpro7 picture mpro7  ·  3Comments

roysubs picture roysubs  ·  3Comments