P
P
Praytic2015-12-19 23:06:09
Node.js
Praytic, 2015-12-19 23:06:09

Why don't commands installed via npm install work?

What could be the reason why freshly installed modules are not recognized by npm install -g <name>windows 7? In theory, after installation, you can immediately write <name> -v. But this command only displays that it is not recognized, for any outcome. Am I missing some other detail in the installation process?

  • node version - 5.3.0 (tried also version 3.*)
  • npm version - 3.3.12 (tried also version 2.*)
  • I reinstalled node.js with both the msi installer and chocolatey.

Here's the obvious error that comes up when trying to check an installed module:
Имя "name" не распознано как имя командлета, функции, файла скрипта или выполняемой программы. Проверьте правильность написания имени, а также наличие и правильность пути, после чего повторите попытку.
строка:1 знак:5
+ name <<<<
    + CategoryInfo          : ObjectNotFound: (name:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Answer the question

In order to leave comments, you need to log in

5 answer(s)
P
Praytic, 2015-12-20
@Praytic

I don't know what the problem was, but the fourth reinstall with reboot solved the problem. Very strange.

A
Alexander Litvinenko, 2015-12-20
@edli007

This is the first time I hear too honestly of such an opportunity, but perhaps I missed something.
Node modules are not executable files, they are like .xls for Excel, they themselves do not run in the sky.
In addition, they are written as parts of another code, and therefore they usually need to be launched not immediately from the node, but through an application written for the node.
Perhaps if you show the module you are trying to connect and explain why, you will be able to get more help.

H
Homsa Toft, 2015-12-20
@kostein

I would venture to suggest that he <name> does not know how to work in windows

A
Anakonda360, 2019-04-10
@Anakonda360

I solved this problem by reinstalling node.js and when reinstalling I left it in drive C:/

V
VVVlada, 2021-07-10
@VVVlada

It helped me to completely restart the computer and immediately everything worked)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question