Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 20:34
    JoshuaVSherman commented #1651
  • Jan 31 2019 20:32
    JoshuaVSherman commented #1651
  • Jan 31 2019 19:42
    bthompson90 commented #1994
  • Jan 30 2019 21:33
    anishmittal2020 commented #1994
  • Jan 29 2019 23:51
    ljharb commented #1994
  • Jan 29 2019 23:51
    anishmittal2020 commented #1994
  • Jan 29 2019 23:49
    anishmittal2020 commented #1994
  • Jan 29 2019 22:05
    Tbhesswebber closed #1997
  • Jan 29 2019 22:05
    Tbhesswebber commented #1997
  • Jan 29 2019 22:03
    ljharb commented #1997
  • Jan 29 2019 22:01
    Tbhesswebber edited #1997
  • Jan 29 2019 21:59
    Tbhesswebber opened #1997
  • Jan 29 2019 18:14
    ljharb labeled #1995
  • Jan 29 2019 18:14
    ljharb labeled #1995
  • Jan 29 2019 18:14
    ljharb labeled #1995
  • Jan 29 2019 18:14
    ljharb commented #1995
  • Jan 29 2019 12:40
    abhishek6262 edited #1996
  • Jan 29 2019 12:39
    abhishek6262 edited #1996
  • Jan 29 2019 12:39
    abhishek6262 opened #1996
  • Jan 29 2019 11:59
    promcoder commented #308
Jordan Harband
@ljharb
oh lol
you said nvim, not nvm. yeah no idea about neovim
cswl
@cswl
How do I update node.js install... there doesnt seem to be a update command
Jordan Harband
@ljharb
@cswl there's not. nvm is for managing multiple versions, so if you need a different one, you just install it
cswl
@cswl
Just installing the version like nvm install lts or node does fetch the latest one.. while it doesnt uninstal the older version... kinda tedious I guess I will write a script for it..
Jordan Harband
@ljharb
@mukhtorov this channel is for nvm, not react.
Sardor
@mukhtorov
ah, sorry
Alibra
@thedubb
Hopefully someone can help me with an nvm issue I'm having. I'm currently using node version 10.5 but anytime I globally install an npm package, it installs to a 9.4.0 directory .../.nvm/versions/node/v9.4.0. I can't seem to figure out how to get nvm to install to the directory that I'm currently in. Is there a command I can run for this?
Jordan Harband
@ljharb
@thedubb what does nvm current print out, and npm root -g?
sameeroath
@sameeroath
Screenshot 2019-02-27 09.45.18.png
Hi guys, can someone please check above image as to why it's happening :/
shouldn't require('<global package name>') just work for me? if yes, can someone please guide me thru steps to fix this.
Jordan Harband
@ljharb
@sameeroath no, global packages are never requireable
things you require are dependencies - thus they must be in your package.json and locally installed.
global packages are only for non-project-specific command line tools, which are very very rare. almost everything should only ever be locally installed.
sameeroath
@sameeroath
hmm so codename wont be available in node repl even if its globally installed?
Screenshot 2019-02-27 10.24.08.png
:point_up: and this is fine?
i can require global package by setting that NODE_PATH env
i don't use global packages on projects/apps just using this setup for ad hoc scripts etc.
Jordan Harband
@ljharb
never do that tho
NODE_PATH is both terrible and deprecated
if you want to require it, make a folder with a package.json or use npx
sameeroath
@sameeroath
i see thanks @ljharb will remove it
Avaray
@Avaray
--reinstall-packages-from Does it just copy files from directory to directory OR it is creating list of global packages, downloading and installing them?
if it is downloading and installing them: does it install the same versions or Latest versions?
Jordan Harband
@ljharb
@Avaray the latter, same versions
Avaray
@Avaray
@ljharb thanks
sespaces
@sespaces
install.sh uses "${XDG_CONFIG_HOME-}" but what is the purpose of the hyphen near the end? it seems extraneous
Jordan Harband
@ljharb
@sespaces it avoids a warning being issued if set -x is used and the variable is not defined.
dkovacevic15
@dkovacevic15
hey friends, can anyone explain why nvm has the install-latest-npm command? what's wrong with just running nvm install followed by npm install --global npm@latest?
Jordan Harband
@ljharb
@dkovacevic15 because the latest version of npm breaks hard on older node versions
and the logic to know which npm is actually safest on which node version is very complex, so i put it in nvm
Libin Varghese
@libinvarghese
Is it possible to run a global binary (like ava, karma, eslint) install in one node version, while I am using another node version? For instance, my project uses an older version of node ie 8, while I have some node tools installed globally in 14, which I would like to use.
Libin Varghese
@libinvarghese
I see there is an alternative which is nve, but it again installs node in some other place and I need to install my global packages/tools again.
Jordan Harband
@ljharb
answered you on freenode in #nvm :-)
Libin Varghese
@libinvarghese
@ijarb: but nvm exec 14 eslint throws the nvm —help
Jordan Harband
@ljharb
hm, works for me here
do you have 14 installed?
or is that your system node
nvm exec system eslint would work too
(if it's your system node)
Libin Varghese
@libinvarghese
@ijharb: nvm exec 14 npm —version works but when I use a global package binary it throws the content of nvm —help
Jordan Harband
@ljharb
is that binary installed in that node version?
meaning, do nvm use 14 and then npm ls -g --depth=0
Libin Varghese
@libinvarghese
ok, my mistake nvm exec 14 mycmd works but nvm exec 14 mycmd —myoptions does not.
I was passing the options everytime. Is there a way to pass options?
Jordan Harband
@ljharb
do -- --myoptions
that’s a normal Unix thing, the double dash by itself says “stop processing arguments, pass the rest on”