I had some issues trying to install Node on Windows 10 and found the solution.
The error was as follows:
C:\Users\Stephan>npm
Error: ENOENT, stat ‘C:\Users\Stephan\AppData\Roaming\npm’
The solution is below.
neophyte
6,5482 gold badges28 silver badges43 bronze badges
asked Dec 7, 2014 at 15:12
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 Files\nodejs
- 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}\AppData\Roaming\npm;C:\Program Files\nodejs
If the PATH variable already contains C:\Users\{YOUR USERNAME HERE}\AppData\Roaming\npm
, append the following right after: ;C:\Program Files\nodejs
If the PATH variable contains information, but nothing regarding npm, append this to the end of the PATH: ;C:\Users\{YOUR USERNAME HERE}\AppData\Roaming\npm;C:\Program Files\nodejs
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.
answered Dec 7, 2014 at 15:12
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
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
DunkenDunken
8,4917 gold badges54 silver badges87 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.
activedecay
10.2k5 gold badges47 silver badges71 bronze badges
answered Mar 11, 2017 at 5:14
Parag MeshramParag Meshram
8,28110 gold badges52 silver badges88 bronze badges
2
Everything should be installed in %appdata% (C:\Users\\AppData\Roaming), 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]\appdata\roaming) 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
TomTom
17.1k8 gold badges67 silver badges75 bronze badges
You should run the installer as administrator.
- Run the command prompt as administrator
- cd directory where msi file is present
- launch msi file by typing the name in the command prompt
- You should be happy to see all node commands work from new command prompt shell
answered Apr 4, 2016 at 17:20
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 ImranAdeel Imran
13.3k8 gold badges62 silver badges77 bronze badges
The reason why you have to modify the AppData could be:
- Node.js couldn’t handle path longer then 256 characters, windows tend to have very long PATH.
- 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 ChuJoel Chu
8281 gold badge9 silver badges25 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
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
AlbertoAlberto
1,43118 silver badges32 bronze badges
Текст ошибки: 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 (произошла ошибка при применении настроек безопасности
аутентифицированный пользователь не является действительным пользователем или группой.
Это может быть проблема с пакетом или проблема с подключением к контроллеру домена в сети.
проверьте подключение к сети и нажмите «Повторить» или «Отменить»)
-
Вопрос задан
-
1035 просмотров
Пригласить эксперта
Консоль от имени админа запусти. И в ней вбивай:
net localgroup Authenticated Users /add
Регистр важен
После этих действий повтори установку
Если через командную строку не выходит, то запускаем lusrmgr.msc (через поиск), в ручную добавляем группу Authenticated Users и в нее добавляем своего пользователя
-
Показать ещё
Загружается…
21 сент. 2023, в 16:00
100000 руб./за проект
21 сент. 2023, в 15:53
10000 руб./за проект
21 сент. 2023, в 15:48
5000 руб./за проект
Минуточку внимания
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\Windows\system32>npm install caress-server
npm http GET https://registry.npmjs.org/caress-server
npm http 304 https://registry.npmjs.org/caress-server
npm http GET https://registry.npmjs.org/jspack/0.0.1
npm http GET https://registry.npmjs.org/buffertools
npm http 304 https://registry.npmjs.org/jspack/0.0.1
npm http 304 https://registry.npmjs.org/buffertools
> buffertools@2.0.1 install C:\Windows\system32\node_modules\caress-server\node_
modules\buffertools
> node-gyp rebuild
C:\Windows\system32\node_modules\caress-server\node_modules\buffertools>node "G:
\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-
gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT
HON env variable.
gyp ERR! stack at failNoPython (G:\nodejs\node_modules\npm\node_modules\node
-gyp\lib\configure.js:101:14)
gyp ERR! stack at G:\nodejs\node_modules\npm\node_modules\node-gyp\lib\confi
gure.js:64:11
gyp ERR! stack at Object.oncomplete (fs.js:107:15)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "G:\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\
bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Windows\system32\node_modules\caress-server\node_modules\buffert
ools
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm ERR! buffertools@2.0.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the buffertools@2.0.1 install script.
npm ERR! This is most likely a problem with the buffertools package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls buffertools
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "G:\\nodejs\\\\node.exe" "G:\\nodejs\\node_modules\\npm\\bin\\n
pm-cli.js" "install" "caress-server"
npm ERR! cwd C:\Windows\system32
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.24
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Windows\system32\npm-debug.log
npm ERR! not ok code 0
C:\Windows\system32>
I am installing a certain NodeJS script — Caress. But i am not unable to. I am using Windows 8.1, can anyone tell me what is the problem i am facing, and why is this installation not working. There seems to be a problem with the buffertools dependency, thats far as i can think. Dont know how maybe fix this?
If i download the build from github and place it in node-modules, nothing seems to work. when i try to start, using npm start, or during implementation either.
G:\nodejs\node_modules\caress-server>npm install
G:\nodejs\node_modules\caress-server>npm start
> caress-server@0.1.1 start G:\nodejs\node_modules\caress-server
> node examples/server.js
info - socket.io started
module.js:340
throw err;
^
Error: Cannot find module './build/Release/buffertools.node'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (G:\nodejs\node_modules\caress-server\node_modules\buf
fertools\buffertools.js:16:19)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
npm ERR! caress-server@0.1.1 start: `node examples/server.js`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the caress-server@0.1.1 start script.
npm ERR! This is most likely a problem with the caress-server package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node examples/server.js
npm ERR! You can get their info via:
npm ERR! npm owner ls caress-server
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "G:\\nodejs\\\\node.exe" "G:\\nodejs\\node_modules\\npm\\bin\\n
pm-cli.js" "start"
npm ERR! cwd G:\nodejs\node_modules\caress-server
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.24
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! G:\nodejs\node_modules\caress-server\npm-debug.log
npm ERR! not ok code 0
G:\nodejs\node_modules\caress-server>
asked Jan 26, 2014 at 16:00
2
NOTE: This is an old answer that applied to earlier versions of NodeJS. My sincere gratitude to these open source projects that responded to this issue and resolved this former pain.
Make sure you have all the required software to run node-gyp
:
- https://github.com/TooTallNate/node-gyp
You can configure version of Visual Studio used by node-gyp
via an environment variable so you can avoid having to set the --msvs_version=2012
property every time you do an npm install.
Examples:
- set
GYP_MSVS_VERSION=2012
for Visual Studio 2012 - set
GYP_MSVS_VERSION=2013e
(the ‘e’ stands for FREE ‘express edition’)
For the full list see
- https://github.com/joyent/node/blob/v0.10.29/tools/gyp/pylib/gyp/MSVSVersion.py#L209-294
This is still painful for Windows users of NodeJS as it assumes you have a copy of Visual Studio installed and many end users will never have this. So I’m lobbying Joyent to the encourage them to include web sockets as part of CORE node and also to possible ship a GNU gcc compiler as part of NodeJS install so we can permanently fix this problem.
Feel free to add your vote at:
- https://github.com/joyent/node/issues/8005#issuecomment-50545326
answered Aug 1, 2014 at 1:49
Tony O’HaganTony O’Hagan
21.7k3 gold badges67 silver badges78 bronze badges
1
I encountered the issue with the error:
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
Here is what I was doing and what finally worked.
Disclaimer: I am just getting my hands into Node, Angular after many years in the Java, Linux world among others…
Environment Description: Windows 8.1 64-bit; Cygwin; cygwin bash shell
Command used that led to error: npm install -g karma
Error:
gyp ERR! configure error
gyp ERR! stack Error: Can’t find Python executable «python», you can set the PYT
HON env variable.
Discovery: ‘which python’ on bash shell clearly shows ‘/usr/bin/python’. Now that is annoying!
Solution: This is only applicable to those using the environment similar to what I have, i.e. using cygwin and bash shell. Hope it helps in other environments as well but keep in mind that your kettle of tea may look a little different than mine.
- Firstly, need to set the $PYTHON shell env variable in .bashrc using the explicit windows path to the python executable and not the unix like root path (/usr/bin) used by cygwin.
- Secondly, and this one took a lot of trial/error and here’s the gotcha! Cygwin installs python under /usr/bin (which is really a mirror of /bin on windows) with the version, i.e. (in my system) /usr/bin/python2.7.exe and then adds a link /usr/bin/python —> python2.7.exe. The problem is that gyp cannot follow this link and keeps giving the annoying error that it cannot find python even though you can find it just fine from the shell command line.
- With the above background now add the following line to your .bashrc
export PYTHON=»C:/cygwin64/bin/python2.7.exe (or whatever is the version on your system)»
- Now source your .bashrc from your home directory (on cygwin)—> ‘source .bashrc’
You should be fine now and gyp will find the python executable.
I hope this helps someone stumbling on the same or similar issue.
Preview
35.3k10 gold badges92 silver badges112 bronze badges
answered Aug 4, 2015 at 22:23
AndyAndy
1191 silver badge5 bronze badges
1
should be able get all node-gyp dependencies with chocolatey for Windows
choco install python2
choco install visualstudioexpress2013windowsdesktop
answered Mar 15, 2016 at 20:54
tarikakyoltarikakyol
5137 silver badges13 bronze badges
Setup JavaScript Environment
1. Install Node.js
Download installer at NodeJs website. You can download the latest V6
2. Update Npm
Npm is installed together with Node.js. So don’t worry.
3. Install Anaconda
Anaconda is the leading open data science platform powered by Python. The open source version of Anaconda is a high performance distribution of Python. It can help you to manage your python dependency. You can use it to create different python environment in the futher if you want to touch with it.
Node-gyp only support >= Python 2.7 and < Python 3.0
So just install the 2.7 version
4. Install Node-gyp
You can install with npm
:
$ npm install -g node-gyp
You will also need to install:
-
On Windows:
-
Option 1: Install all the required tools and configurations using Microsoft’s windows-build-tools using
npm install --global --production windows-build-tools
from an elevated PowerShell or CMD.exe (run as Administrator). -
Option 2: Install tools and configuration manually:
-
Visual C++ Build Environment:
- Option 1: Install Visual C++ Build Tools using the Default Install option.
- Option 2: Install Visual Studio 2015 (or modify an existing installation) and select Common Tools for Visual C++ during setup. This also works with the free Community and Express for Desktop editions.
💡 [Windows Vista / 7 only] requires .NET Framework 4.5.1
-
Launch cmd,
npm config set msvs_version 2015
If the above steps didn’t work for you, please visit Microsoft’s Node.js Guidelines for Windows for additional tips.
-
If you have multiple Python versions installed, you can identify which Python version node-gyp
uses by setting the ‘—python’ variable:
$ node-gyp --python C:/Anaconda2/python.exe
If node-gyp
is called by way of npm
and you have multiple versions of Python installed, then you can set npm
‘s ‘python’ config key to the appropriate value:
$ npm config set python C:/Anaconda2/python.exe
Future update for Node.js and npm
Download installer from their official website and direct install it. The installer will automatic help you to remove old files.
npm update npm
Future update for Python
conda update --all
answered Sep 22, 2016 at 9:10
Fixed with downgrading Node from v12.8.1 to v11.15.0 and everything installed successfully
answered Aug 21, 2019 at 16:35
MakMak
20k5 gold badges26 silver badges32 bronze badges
gyp ERR! configure error gyp ERR! stack Error: Can’t find Python
executable «python», you can set the PYT HON env variable.
This means the Python env. variable should point to the executable python file, in my case:
SET PYTHON=C:\work\_env\Python27\python.exe
answered Aug 16, 2016 at 15:07
For Cygwin users:
The python issue with using npm
on an out-of-the-box Cygwin installation, is that node-gyp
is giving a misleading error due to incomplete checking in the ../npm/node_modules/node-gyp/lib/configure.js
code.
It’s due to how Cygwin treats symbolic links. It doesn’t do that properly in an out-of-the box installation. So the error messages from the above code become misleading, as it complains about the PYTHON
path and not the existence of python.exe
(or link of) file itself.
There are (at least) 2 ways to resolve this.
- Installing the Cygwin package
cygutils-extra
and usewinln
. - Use native Windows CMD in Admin mode.
For (1) you can create a proper symlink from within Cygwin shell by doing these steps:
# To make the Cygwin environment treat Windows links properly:
# Alternatively add this to your `.bashrc` for permanent use.
export CYGWIN=winsymlinks:nativestrict
# Install Cygwin package containing "winln"
apt-cyg install cygutils-extra
# Make a proper Windows sym-link:
cd /cygdrive/c/cygwin64/bin/
winln.exe -s python2.7.exe python.exe
# Add PYTHON as a native Windows system wide variable (HKLM)
setx /M PYTHON "C:\cygwin64\bin\python"
(Also assuming you are running the Cygwin shell as Admin.)
Using apt-cyg
is recommended and can be found in various forms on github.
For (2) the resolution for out-of-the-box Cygwin users is this:
# Open a native Windows CMD in Administrator mode and:
cd C:\cygwin64\bin\
mklink python.exe python2.7.exe
The result should look like this:
C:\cygwin64\bin>ls -al python*
lrwxrwxrwx 1 xxx xxx 13 Jun 2 2015 python -> python2.7.exe
lrwxrwxrwx 1 Administrators xxx 13 Aug 24 17:28 python.exe -> python2.7.exe
lrwxrwxrwx 1 xxx xxx 13 Jun 2 2015 python2 -> python2.7.exe
-rwxr-xr-x 1 xxx xxx 9235 Jun 2 2015 python2.7.exe
answered Aug 24, 2016 at 16:05
emigenixemigenix
2012 silver badges4 bronze badges
For windows
Check python path in system variable.
npm plugins need node-gyp to be installed.
open command prompt with admin rights, and run following command.
npm install —global —production windows-build-tools
npm install —global node-gyp
answered Nov 17, 2017 at 9:07
0
I was working on an old Vue 2.x project, at least 2 years old and deps were never updated. Reverting to Node v10.16.3 worked for me. Versions 14 and 12 did not work.
answered Jul 13, 2021 at 19:10
for me the solution was:
rm -rf ~/.node_gyp and
sudo npm install -g node-gyp@3.4.0
cd /usr/local/lib sudo ln -s ../../lib/libSystem.B.dylib libgcc_s.10.5.dylib
brew install gcc
npm install
answered Jan 4, 2017 at 8:02
OrrOrr
4,7403 gold badges28 silver badges31 bronze badges
I was installing appium by npm install -g appium and getting the same error on Windows 10.
Below command worked for me:
npm --add-python-to-path='true' --debug install --global windows-build-tools
https://github.com/felixrieseberg/windows-build-tools/issues/33
answered Oct 12, 2017 at 14:45
hemantohemanto
1,9301 gold badge17 silver badges16 bronze badges
The question is already answered but these were not working in my case which is alpine Linux based OS so maybe this helps someone else.
I was also getting same error
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
So fix by single line just add this if you are working in Dockerfile or install it in OS
apk add --no-cache python nodejs
in ubuntu
sudo apt-get install python3.6
Note: Node version:8
answered Jan 3, 2018 at 8:54
AdiiiAdiii
54.8k7 gold badges147 silver badges150 bronze badges
install node-gyp and c++ compiler (gcc-c++).
answered Mar 27, 2018 at 0:24
2
npm install —global —production windows-build-tools
answered Feb 25, 2021 at 19:13
26.01.2021
6 комментариев
51 189
Привет! Рассмотрим установку Node.js на Windows 7 и протестируем его работу.
При попытке установить последнюю версию Node.js на Windows 7, в моем случае v14.15.4 LTS (ссылка), возникает ошибка о том, что приложение поддерживается на Windows 8.1. и выше:
1. Находим более раннюю версию, которая подойдёт для Windows 7, перейдем по ссылке (на сайт nodejs.org).
2. Скачиваем версию для вашей операционной системы (у меня ссылка на v13.14.0-x64.msi). Открываем этот файл для установки:
3. В открывшемся окошке подтверждаем свою готовность к установке нажатием кнопки Next:
4. Соглашаемся с условиями лицензионного соглашения, ставим галочку и нажимаем Next:
5. По умолчанию, установка Node.js происходит в папку C: \Program Files\nodejs\ на Вашем компьютере. Поменяйте, при необходимости, и нажимайте Next:
6. Далее идут пользовательские настройки. Предлагается установить дополнительные инструменты — на Ваше усмотрение. Оставляем как есть и нажимаем Next:
7. Видим сообщение об успешной установке, нажимаем Finish:
Мои поздравления 🙂 Node.js установлен.
1. Через Пуск открываем стандартную программу Windows Выполнить , если не нашли Командную строку:
1.1. Командой cmd открываем консоль:
2. Теперь пишем в консоли node -v — так проверяем работу Node.js. Видим на экране установленную версию, в моём случае v13.14.0:
3. Дальше командой npm -v проверяем наличие npm. Видим версию, в моем случае 6.14.4
Всё отлично, мы решили проблему: установили Node.js на Windows 7 и проверили его работу.
Голосов: 100, Средняя оценка: 4.8
MSI (s) (B8:7C) [14:59:56:454]: Dir (source): Key: NpmFolder , Object: C:\temp\ , LongSubPath: nodejs\node_modules\npm\ , ShortSubPath: nodejs\1ef5zb6j\npm\
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:\WINDOWS\Installer\MSI705.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:\WINDOWS\Installer\MSI705.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:\WINDOWS\Installer\MSI705.tmp