* npm 'command not found' while node js is installed ?
@ 2022-10-19 1:49 jordi
2022-10-19 19:34 ` Wojtek Kosior via
0 siblings, 1 reply; 2+ messages in thread
From: jordi @ 2022-10-19 1:49 UTC (permalink / raw)
To: help-guix
Hi Guixers,
I installed nodejs package.
When i go 'npm' in the shell i'm getting a 'command not found' error message.
how to get 'npm' working ? what am i missing ?
thanks, thanks, thanks
Fenix
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: npm 'command not found' while node js is installed ?
2022-10-19 1:49 npm 'command not found' while node js is installed ? jordi
@ 2022-10-19 19:34 ` Wojtek Kosior via
0 siblings, 0 replies; 2+ messages in thread
From: Wojtek Kosior via @ 2022-10-19 19:34 UTC (permalink / raw)
To: jordi; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 2086 bytes --]
> Hi Guixers,
>
> I installed nodejs package.
> When i go 'npm' in the shell i'm getting a 'command not found' error message.
>
> how to get 'npm' working ? what am i missing ?
>
> thanks, thanks, thanks
>
> Fenix
Hi there,
I suppose you're that either
* you're using some Guix version that does not include the npm command
in `node` package or
* you don't have Guix profile's `bin/` directory in your PATH variable.
The second seems more likely. I don't know if the first one is
possible, actually (I have no clue about the history of `node` package).
Try
guix shell -C node -- npm --help
to verify that npm is available in your current Guix version. You
perhaps realize what this command does. Just in case - it runs
`npm --help` in a container. If it works (i.e. npm's `--help` output is
printed), it means your PATH variable did not contain the path to the
profile with npm and that was the cause of your problem. Fix it by
editing your shell initialization files. These are e.g. `~/.bashrc` and
`~/.profile`. Or others depending on the shell you're using.
Btw, you can verify that npm is indeed present in Guix by running
guix time-machine --commit=a86979b41a49a8fcdaa887970ba594dbba701226 -- shell -C node -- npm --help
This will use a fixed version of Guix to run npm in a container. But
this way neither incorrectly initialized PATH variable nor outdated
`node` package will be able to cause you problems. The `time-machine`
command might take some time to finish upon the first run... I'm giving
it here as an interesting example - you shouldn't need `time-machine`
for merely installing npm :)
Please tell if you managed to fix the problem
Good luck,
Wojtek
-- (sig_start)
website: https://koszko.org/koszko.html
PGP: https://koszko.org/key.gpg
fingerprint: E972 7060 E3C5 637C 8A4F 4B42 4BC5 221C 5A79 FD1A
Meet Kraków saints! #11: saint Jacek Odrowąż
Poznaj świętych krakowskich! #11: święty Jacek Odrowąż
https://pl.wikipedia.org/wiki/Jacek_Odrowąż
-- (sig_end)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-19 19:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-19 1:49 npm 'command not found' while node js is installed ? jordi
2022-10-19 19:34 ` Wojtek Kosior via
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.