Can't find npm [Solved]

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

Can't find npm [Solved]

Postby jk121960 » Sep 26th, '18, 04:21

Hi and thanks, I am using Mageia 6 KDE new install, I installed npm but the system can't find it. The executable should be /usr/bin/npm there a soft link should point to ../lib/node modules/npm/bin/npm-cli.js but that soft link does not exist. Any help with this would be great, thanks in advance for your effort
Last edited by jk121960 on Sep 28th, '18, 12:21, edited 1 time in total.
jk121960
 
Posts: 8
Joined: Sep 26th, '11, 03:13

Re: Can't find npm

Postby doktor5000 » Sep 26th, '18, 23:51

jk121960 wrote:Hi and thanks, I am using Mageia 6 KDE new install, I installed npm but the system can't find it.

How do you try, or what is the error you're seeing? Just installed npm and it's present:



Code: Select all
[doktor5000@Mageia6]─[23:48:51]─[~] which npm
/bin/npm
[doktor5000@Mageia6]─[23:50:36]─[~] ls -al /bin/npm
lrwxrwxrwx 1 root root 38 Mai  5  2017 /bin/npm -> ../lib/node_modules/npm/bin/npm-cli.js*
[doktor5000@Mageia6]─[23:50:46]─[~]

[doktor5000@Mageia6]─[23:50:46]─[~] npm --help

Usage: npm <command>

where <command> is one of:
    access, adduser, bin, bugs, c, cache, completion, config,
    ddp, dedupe, deprecate, dist-tag, docs, edit, explore, get,
    help, help-search, i, init, install, install-test, it, link,
    list, ln, login, logout, ls, outdated, owner, pack, ping,
    prefix, prune, publish, rb, rebuild, repo, restart, root,
    run, run-script, s, se, search, set, shrinkwrap, star,
    stars, start, stop, t, tag, team, test, tst, un, uninstall,
    unpublish, unstar, up, update, v, version, view, whoami

npm <cmd> -h     quick help on <cmd>
npm -l           display full usage info
npm help <term>  search for help on <term>
npm help npm     involved overview

Specify configs in the ini-formatted file:
    /home/doktor5000/.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config

npm@3.10.10 /usr/lib/node_modules/npm
[✗]─[doktor5000@Mageia6]─[23:51:25]─[~]
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17659
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Can't find npm

Postby jk121960 » Sep 27th, '18, 01:08

Hi and thanks, I installed from the package manager, but when I go to use it from cli, it says it can't find it. the link from /usr/bin/npm is a dead soft link. The soft link reads ../lib/node_modules/npm/bin/npm-cli.js but there is nothing there. I have uninstalled rebooted and reinstalled and the same thing, oddly I can see npm was there at one point as there is a boatload of node modules installed under an npm directory. As far as that link, it is present up until the npm before the bin, the bin and whatever is in it is gone.

Thanks in advance for any help or advice
jk121960
 
Posts: 8
Joined: Sep 26th, '11, 03:13

Re: Can't find npm

Postby doktor5000 » Sep 27th, '18, 23:07

The file which the symlink is pointing to is contained in the nodejs subpackage AFAICT, but I don't have an mga system to check right now. So you may want to reinstall that.
Code: Select all
urpmi --replacepkgs --replacefiles npm nodejs

should help.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17659
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Can't find npm (resolved)

Postby jk121960 » Sep 28th, '18, 01:04

Great thanks, worked like a charm, your awesome thank you, saved from a reinstall
jk121960
 
Posts: 8
Joined: Sep 26th, '11, 03:13

Re: Can't find npm

Postby doktor5000 » Sep 28th, '18, 06:33

Please mark the thread as solved by editing the subject of the first post and prefix it with [SOLVED ], thanks in advance.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17659
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Can't find npm [Solved]

Postby jk121960 » Sep 28th, '18, 12:21

Done and thanks again
jk121960
 
Posts: 8
Joined: Sep 26th, '11, 03:13


Return to Basic support

Who is online

Users browsing this forum: Google [Bot] and 1 guest