Node js не устанавливается на windows 10 ошибка

I had some issues trying to install Node on Windows 10 and found the solution.

The error was as follows:

C:UsersStephan>npm
Error: ENOENT, stat ‘C:UsersStephanAppDataRoamingnpm’

The solution is below.

neophyte's user avatar

neophyte

6,5302 gold badges28 silver badges43 bronze badges

asked Dec 7, 2014 at 15:12

Stephan Bijzitter's user avatar

Edit:
It seems like new installers do not have this problem anymore, see this answer by Parag Meshram as my answer is likely obsolete now.

Original answer:

Follow these steps, closely:

  • http://nodejs.org/download/ download the 64 bits version, 32 is for hipsters
  • Install it anywhere you want, by default: C:Program Filesnodejs
  • Control Panel -> System -> Advanced system settings -> Environment Variables
  • Select PATH and choose to edit it.

If the PATH variable is empty, change it to this: C:Users{YOUR USERNAME HERE}AppDataRoamingnpm;C:Program Filesnodejs

If the PATH variable already contains C:Users{YOUR USERNAME HERE}AppDataRoamingnpm, append the following right after: ;C:Program Filesnodejs

If the PATH variable contains information, but nothing regarding npm, append this to the end of the PATH: ;C:Users{YOUR USERNAME HERE}AppDataRoamingnpm;C:Program Filesnodejs

Now that the PATH variable is set correctly, you will still encounter errors. Manually go into the AppData directory and you will find that there is no npm directory inside Roaming. Manually create this directory.

Re-start the command prompt and npm will now work.

Community's user avatar

answered Dec 7, 2014 at 15:12

Stephan Bijzitter's user avatar

7

go to http://nodejs.org/

and hit the button that says «Download For …»

This’ll download the .msi (or .pkg for mac) which will do all the installation and paths for you, unlike the selected answer.

answered Sep 26, 2015 at 4:54

Shai UI's user avatar

8

In addition to the answer from @StephanBijzitter I would use the following PATH variables instead:

%appdata%npm
%ProgramFiles%nodejs

So your new PATH would look like:

[existing stuff];%appdata%npm;%ProgramFiles%nodejs

This has the advantage of neiter being user dependent nor 32/64bit dependent.

answered Oct 30, 2015 at 12:42

Dunken's user avatar

DunkenDunken

8,3937 gold badges54 silver badges86 bronze badges

1

New installers (.msi downloaded from https://nodejs.org) have «Add to PATH» option. By default it is selected. Make sure that you leave it checked.

Add to PATH

activedecay's user avatar

activedecay

10k4 gold badges45 silver badges69 bronze badges

answered Mar 11, 2017 at 5:14

Parag Meshram's user avatar

Parag MeshramParag Meshram

8,23110 gold badges51 silver badges88 bronze badges

2

Everything should be installed in %appdata% (C:Users\AppDataRoaming), not ‘program files’.

Here’s why…

The default MSI installer puts Node and the NPM that comes with it in ‘program files’ and adds this to the system path, but it sets the user path for NPM to %appdata% (c:users[username]appdataroaming) since the user doesn’t have sufficient priveleges to write to ‘program files’.

This creates a mess as all modules go into %appdata%, and when you upgrade NPM itself — which NPM themselves recommend you do right away — you end up with two copies: the original still in ‘program files’ since NPM can’t erase that, and the new one inn %appdata%.

Even worse, if you mistakenly perform NPM operations as admin (much easier on Windows then on *nix) then it will operate on the ‘program files’ copy of NPM node_modules. Potentially a real mess.

So, when you run the installer simply point it to %appdata% and avoid all this.

And note that this isn’t anything wierd — it’s what would happen if you ran the installer with just user priveleges.

answered Nov 17, 2017 at 3:50

Tom's user avatar

TomTom

16.9k8 gold badges66 silver badges75 bronze badges

You should run the installer as administrator.

  1. Run the command prompt as administrator
  2. cd directory where msi file is present
  3. launch msi file by typing the name in the command prompt
  4. You should be happy to see all node commands work from new command prompt shell

answered Apr 4, 2016 at 17:20

arunram's user avatar

arunramarunram

6237 silver badges11 bronze badges

I had the same problem, what helped we was turning of my anti virus protection for like 10 minutes while node installed and it worked like a charm.

answered May 20, 2018 at 7:36

Adeel Imran's user avatar

Adeel ImranAdeel Imran

12.8k8 gold badges61 silver badges77 bronze badges

The reason why you have to modify the AppData could be:

  1. Node.js couldn’t handle path longer then 256 characters, windows tend to have very long PATH.
  2. If you are login from a corporate environment, your AppData might be on the server — that won’t work. The npm directory must be in your local drive.

Even after doing that, the latest LTE (4.4.4) still have problem with Windows 10, it worked for a little while then whenever I try to:

$ npm install _some_package_ --global 

Node throw the «FATAL ERROR CALL_AND_RETRY_LAST Allocation failed — process out of memory» error. Still try to find a solution to that problem.

The only thing I find works is to run Vagrant or Virtual box, then run the Linux command line (must matching the path) which is quite a messy solution.

answered May 9, 2016 at 7:57

Joel Chu's user avatar

Joel ChuJoel Chu

8081 gold badge9 silver badges24 bronze badges

For me I had to delete the nodejs folder in program files and then when I went to install through the msi it worked. Seemed like when I uninstalled Node it didnt actually delete this file

answered May 26, 2022 at 14:32

Frankie Duck's user avatar

I had the same problem, but after trying everything on this post unsuccessfully, I just had to restart.
So if you haven’t tried restarting the computer after the installation, try it.

Restart your computer after installation

answered Jan 20, 2022 at 10:14

Alberto's user avatar

AlbertoAlberto

1,42318 silver badges31 bronze badges

I finished my PC today and I wanted to install node.js on it.
But for some weird reason, it is saying «Copying files» and then after a few seconds, it says «Rolling back». I can’t think of a reason why it is not installing. Windows is Windows 10 «Spring Update» 1803.

Here’s a proof, in form of a unlisted video on Youtube.

Thanks in advance.

Niklas

asked May 10, 2018 at 18:00

Niklas Haiden's user avatar

1

I was facing same problems in win 10 system but i was able to install it by doing following steps:

— Disable ur antivirus it might be blocking node event tracer

— Disable installation of all components as shown in image below

installation file image

— complete installation

— After installation again go to setup and enable components one by one and install , leave out performance counter

— After all components are installed code to cmd and do node -v u will see it works

answered Jun 2, 2018 at 13:28

Nikhil Kamani's user avatar

1

A batch script (within //nodejs/node_modules/npm) is no longer supported on Windows 10, version 1803. This file does not properly copy over (this is NOT a hard drive issue but rather an issue with this version of Windows 10!).

File(s) affected:

  • nodejsnode_modulesnpmmake.bat (This file alone requires a reboot.)

Copying this file over from the Zip archive IS possible, but requires a reboot to get out of the copy prompt.

answered May 17, 2018 at 11:20

Lilly Satou's user avatar

Same problem here, but after some research of old same problem, found to install without ETW (Event tracing) or without Performance Counters (during the installation you can select those options under Node.js runtime branch), but I got some new errors when npm install/npm run dev, some with node-sass issues.

EDIT: Ok, so my problem was directly with my antivirus (Avast), I’ve been reading that with AVG there is the same problem, then you can install it without getting rid of ETW or PC.

answered May 17, 2018 at 3:42

liga's user avatar

ligaliga

978 bronze badges

I had the same problem (On windows 10 1909). You can work around this by installing Node.js using Chocolatey instead https://chocolatey.org/packages/nodejs.install

Open Powershell elevated and run the following command:

choco install nodejs.install

That worked for me when everything else did not!

Note that choco is a Chocolatey command (it is like npm). If you don’t already have Chocolatey already installed, go to https://chocolatey.org/install and get the install command.

answered Aug 8, 2020 at 12:30

Lance McCarthy's user avatar

Lance McCarthyLance McCarthy

1,8641 gold badge20 silver badges38 bronze badges

Just disabled your antivirus first before installing!

answered Feb 18, 2021 at 4:38

this.hart's user avatar

this.hartthis.hart

2082 silver badges9 bronze badges

MSI (s) (B8:7C) [14:59:56:454]: Dir (source): Key: NpmFolder	, Object: C:temp	, LongSubPath: nodejsnode_modulesnpm	, ShortSubPath: nodejs1ef5zb6jnpm
Action ended 14:59:57: ProcessComponents. Return value 1.
MSI (s) (B8:7C) [14:59:57:013]: Doing action: UnpublishFeatures
Action start 14:59:57: UnpublishFeatures.
Action ended 14:59:57: UnpublishFeatures. Return value 1.
MSI (s) (B8:7C) [14:59:57:014]: Doing action: RemoveRegistryValues
Action start 14:59:57: RemoveRegistryValues.
Action ended 14:59:57: RemoveRegistryValues. Return value 1.
MSI (s) (B8:7C) [14:59:57:015]: Doing action: ConfigureEventManifestUnregister
Action start 14:59:57: ConfigureEventManifestUnregister.
MSI (s) (B8:70) [14:59:57:017]: Invoking remote custom action. DLL: C:WINDOWSInstallerMSI705.tmp, Entrypoint: ConfigureEventManifestUnregister
MSI (s) (B8:5C) [14:59:57:017]: Generating random cookie.
MSI (s) (B8:5C) [14:59:57:018]: Created Custom Action Server with PID 6520 (0x1978).
MSI (s) (B8:18) [14:59:57:031]: Running as a service.
MSI (s) (B8:18) [14:59:57:035]: Hello, I'm your 32bit Impersonated custom action server.
CustomAction ConfigureEventManifestUnregister returned actual error code 1157 (note this may not be 100% accurate if translation happened inside sandbox)
MSI (s) (B8:7C) [14:59:57:041]: Note: 1: 1723 2: ConfigureEventManifestUnregister 3: ConfigureEventManifestUnregister 4: C:WINDOWSInstallerMSI705.tmp 
MSI (s) (B8:7C) [14:59:58:861]: Product: Node.js -- Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action ConfigureEventManifestUnregister, entry: ConfigureEventManifestUnregister, library: C:WINDOWSInstallerMSI705.tmp 

Текст ошибки: an error occured while applying security setting
authenticated users is not a valid user or group.
This could be a problem with the package or a problem connecting to a domain controler on the network.
check your network connection and click retry or cencel (произошла ошибка при применении настроек безопасности
аутентифицированный пользователь не является действительным пользователем или группой.
Это может быть проблема с пакетом или проблема с подключением к контроллеру домена в сети.
проверьте подключение к сети и нажмите «Повторить» или «Отменить»)


  • Вопрос задан

    более года назад

  • 990 просмотров

Пригласить эксперта

Консоль от имени админа запусти. И в ней вбивай:
net localgroup Authenticated Users /add
Регистр важен
После этих действий повтори установку

Если через командную строку не выходит, то запускаем lusrmgr.msc (через поиск), в ручную добавляем группу Authenticated Users и в нее добавляем своего пользователя


  • Показать ещё
    Загружается…

04 июн. 2023, в 01:35

1500 руб./за проект

04 июн. 2023, в 01:25

40000 руб./за проект

03 июн. 2023, в 23:42

1500 руб./за проект

Минуточку внимания

#javascript #node.js #windows #windows-10

#javascript #node.js #Windows #windows-10

Вопрос:

Я пробовал многократный способ избавиться от этого. Но он продолжает показывать мне ошибку. Пожалуйста, есть ли какой-нибудь способ решить эту проблему? Спасибо
Ошибка, которую я получаю

 This installation package could not be opened. 
Verify that the package exists and that you can access it, or contact the application vendor to verify 
that this is a valid Windows Installer package.
 

Комментарии:

1. Похоже, загрузка не удалась. Вы пробовали повторно загрузить пакет?

2. Да, я загрузил все возможные версии, по-прежнему получая ту же ошибку: (

3. Пробовал работать от имени администратора?

4. Пожалуйста, никогда не публикуйте изображение текста. Вместо этого отредактируйте вопрос и поместите туда текст.

5. Я ввел ошибку

Ответ №1:

Переместите загруженный файл в другое место, отличное от c:/, после чего он будет установлен.

Понравилась статья? Поделить с друзьями:
  • Node is not defined ошибка
  • Nod32 при установке драйвера edevmon произошла ошибка
  • Nod32 ошибка при удалении
  • Not a statement java ошибка что значит
  • Not a legal oleaut date ошибка