Node no executable found in path windows

NodeJS-ошибка установки с NPM

Я устанавливаю определенный скрипт NodeJS -ласки. Но я не могу этого сделать. Я использую Windows 8.1, может кто-нибудь сказать мне, что это проблема я столкнулся, и почему эта установка не работает. Кажется, есть проблема с зависимостью buffertools, насколько я могу думать. Не знаю, как это можно исправить?

Если я загружаю сборку из github и помещаю ее в node-modules, ничего не работает. когда я пытаюсь начать, используя npm start, или во время реализации тоже.

12 ответов:

Как указано ниже, вам может не понадобиться устанавливать VS на windows, проверьте это

обновление 02/2016

некоторые плагины npm нужны node-gyp для установки.

однако, node-gyp имеет свои собственные зависимости (со страницы github):

обновление 09/2016

если вы с помощью Windows Теперь вы можете установить все node-gyp зависимости с помощью одной команды (Примечание: Запуск от имени администратора в Windows PowerShell):

а затем установить пакет

обновлено 06/2018

удалить $HOME/.узел-каталог gyp и повторите попытку.

Смотрите полную документацию здесь: node-gyp

убедитесь, что у вас есть все необходимое программное обеспечение для работы node-gyp :

вы можете настроить версию Visual Studio, используемую node-gyp через переменную окружения, так что вы можете избежать необходимости установки —msvs_version=2012 свойство каждый раз, когда вы делаете установку npm.

  • set GYP_MSVS_VERSION=2012 для Visual Studio 2012
  • set GYP_MSVS_VERSION=2013e (‘e’ означает Бесплатная экспресс-выпуск’)

Это все еще болезненно для пользователей Windows NodeJS, поскольку предполагается, что у вас установлена копия Visual Studio, и у многих конечных пользователей этого никогда не будет. Поэтому я лоббирую Joyent для поощрения их к включению веб-сокетов в качестве части основного узла, а также к возможному отправке компилятора GNU gcc в качестве части NodeJS установить, так что мы можем навсегда решить эту проблему.

не стесняйтесь добавлять свой голос на сайте:

я столкнулся с проблемой с ошибкой:

вот что я делал и что, наконец, сработало.

отказ от ответственности: Я просто получаю свои руки в узел, угловой после многих лет в мире Java, Linux и других.

Описание Окружающей Среды: Windows 8.1 64-разрядная; Cygwin; cygwin bash shell

используется, что привело к ошибке: npm install-g карма

: джип ЭРР! ошибка настройки джип ЭРР! ошибка стека: не удается найти исполняемый файл Python «python», вы можете установить PYT HON env variable.

Discovery: ‘какой python’ на оболочке bash ясно показывает ‘/ usr/bin / python’. Теперь это раздражает!

решение: это применимо только к тем, кто использует среду, аналогичную тому, что у меня есть, т. е. с помощью cygwin и bash shell. Надеюсь, что это поможет в других средах, как но имейте в виду, что ваш чайник чая может выглядеть немного иначе, чем мой.

  1. во-первых, необходимо установить переменную $ PYTHON shell env.bashrc использует явный путь windows к исполняемому файлу python, а не корневой путь unix (/usr/bin), используемый cygwin.
  2. во-вторых, и этот взял много проб / ошибок,и вот вам! Cygwin устанавливает python под /usr / bin (который на самом деле является зеркалом /bin в windows) с версией, т. е. (в моем system) / usr/bin / python2.7.exe, а затем добавляет ссылку / usr/bin / python —> python2.7.исполняемый. Проблема в том, что gyp не может следовать этой ссылке и продолжает давать раздражающую ошибку, что он не может найти python, хотя вы можете найти его просто отлично из командной строки оболочки.
  3. с вышеуказанным фоном теперь добавьте следующую строку к вашему .bashrc
Читайте также:  Windows 10 enterprise ltsc activation

экспорт PYTHON=»C:/cygwin64/bin/python2.7.exe (или любая другая версия на вашем система)»

  1. теперь источник вашей .bashrc из вашего домашнего каталога (на cygwin)—> ‘source .bashrc’

теперь вы должны быть в порядке, и gyp найдет исполняемый файл python.

Я надеюсь, что это поможет кому-то наткнуться на ту же или подобную проблему.

Node Interpreter: node (No executable found in $PATH) Follow

Trying to execute simple JaveScript code in IntelliJ IDEA:

When I try to run it brings up the Edit configuration window.

I click on the . and then the + sign to add a local, but I can’t find the node.

I do have the Node.js and Node.js Remote Interpreter plugins installed and enabled.

My IDEA application installed in the default location: /usr/local/bin/

But I can’t see node there.

I can see the hidden files.

How might I be able to find the node?

I also have a similar error when trying to use the «JavaScript for Beginners» course on for the Learn and Teach plugin.

Your help is greatly appreciated!

Votes

Share

You need to install node.js itself and have a binary on the system that you can run from the terminal: https://nodejs.org/en/ .

Thank you Serge!

I really appreciate it!

For others out there, I went to the link above, clicked on one of the downloads, installed it.

It showed the default location as /usr/local/bin/node and I accepted.

Once it finished installing, I checked the Languages and Frameworks for Node.js and NPM and it had already updated the Node interpreter with the file path.

If it works with the regular installer, it means Webstorm is incompatible with NVM. Node is installed via NVM and on the PATH, but Webstorm has some sort of dependency on the official installer.

@Jason Tiscione No, it doesn’t seem to have any relation to having Node.js installed with NVM

The problem I’m having is that all the features in the Run menu are broken.

Node is on the PATH. If I open up the Terminal tab and type «which node» it prints the location of the current executable in NVM. If I type echo $PATH I can see it. But if I create a node or npm run target, the «Node Interpreter» dropdown says «node: NO EXECUTABLE FOUND IN PATH».

So I try specifying the absolute path to the NVM folder’s node executable in the dropdown instead. But if I try to run it, it still crashes and complains that node is not on the PATH:

Читайте также:  Linux сетевые адаптеры установлены

«/home/jason/.nvm/versions/node/v12.18.0/bin/node /home/jason/.nvm/versions/node/v12.18.0/lib/node_modules/npm/bin/npm-cli.js start
npm WARN lifecycle npm is using /home/jason/.nvm/versions/node/v12.18.0/bin/node but there is no node binary in the current PATH.»

/usr/bin/env: ‘node’: No such file or directory
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! the-nextjs-starter@1.0.0 start: `nodemon server.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the the-nextjs-starter@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/jason/.npm/_logs/2020-07-09T18_39_03_936Z-debug.log

Process finished with exit code 1

So I try copy/paste of the command line that Webstorm claims to be running. It works with no problems, both inside and outside Webstorm’s terminal. So this is obviously a bug in Webstorm.

I tried downgrading to 2019.3.3 but that version is also broken.

[WIN] Where is the executable PATH? #1258

Comments

seanvree commented Aug 8, 2017 •

Node Version:
NODE: v6.11.1
NPM: 5.3.0

Platform:
Window 10E x64 1703

Compiler:
VS2015

Module:

Sorry if this is a noob question, but I can’t seem to figure this out.
I installed node-gyp fine from C:\node-gyp, but it’s not being added to my PATH.

Where is the executable to add to my PATH?

The text was updated successfully, but these errors were encountered:

bnoordhuis commented Aug 8, 2017

You don’t usually have to install node-gyp yourself. It’s bundled with npm and npm takes care of executing it when installing modules that need it.

refack commented Aug 8, 2017

Plus a general windows tip, you can run where node-gyp or where npm in a cmd.exe console, and cmd will tell you where the files it can run are. For example:

seanvree commented Aug 8, 2017

I do understand both of your points, and that SHOULD work, but it’s not in my environment for some reason despite a successful install as you see in my OP. Which is why I was asking how to manually add it to my PATH because I can’t seem to invoke node-gyp:

bnoordhuis commented Aug 8, 2017

If you installed node-gyp with npm install -g , then it’s wherever npm puts global binaries. See https://stackoverflow.com/questions/33819757/global-npm-install-location-on-windows for more info.

seanvree commented Aug 8, 2017

Right, I’ve got that DIR, and I can navigate to it, but again, how do I launch node-gyp from that DIR? . or any Directory?

Where is the actual .exe or .bat file?

bnoordhuis commented Aug 8, 2017

There should be a node-gyp.cmd in that directory, unless you have bin-links set to false in your npm config.

I don’t want to cut this conversation short but your questions are really about npm, not node-gyp. Happy to help if you can’t figure something out but see if you can find the answer in npm’s documentation first.

seanvree commented Aug 8, 2017 •

with all due respect, I run many many NPM and Node packages without issue. I simply followed your exact instructions, and I can’t run your specific package. That’s all. I’m trying to understand what I’m doing wrong here.

I DO NOT have a node-gyp.cmd in that DIR.

refack commented Aug 8, 2017

@seanvree node-gyp (and any other global npm packages) uses an npm mechanism to create the «shim» that is used to run the the CLI endpoint of the package (in this case node-gyp.cmd ).
npm puts it in the directory pointed to by npm config get prefix
You can run these two commands and check that the npm global directory is in your %Path%

Читайте также:  Gpu drivers windows 10

this will show you npm ‘s configuration

this will pretty print the directories in your %Path%

[coc.nvim] node is not executable (node installed by nvm) #856

Comments

sandangel commented Jun 9, 2019 •

Describe the bug

When installed with nvm, node when we first started the shell is a function defined in nvm scripts. So if we use executable to check, the error will be shown as above

Reproduce the bug

open the shell, execute nvim , the error above will show up
run which node :

run node -v && nvim , the error will no longer show

I think We should change the executable(‘node’) check to something else, because most of node users is using nvm to install node

The text was updated successfully, but these errors were encountered:

chemzqm commented Jun 9, 2019 •

because most of node users is using nvm to install node

I can’t agree, since nvm sucks on many cases.

Use let g:coc_node_path = ‘/path/to/node’ when you can’t use node in your $PATH.

Muzietto commented Dec 16, 2019

because most of node users is using nvm to install node

I can’t agree, since nvm sucks on many cases.

This personal opinion regarding nvm is irrelevant to the true fact mentioned by the OP.

Please reconsider providing a user-friendly feature for solving this annoying issue.

LukeAI commented Jan 28, 2020

So how do I resolve this? I have just installed neovim and coc.nvim on a fresh ubuntu 16.04 system. Do I have to install nodejs?

oblitum commented Jan 28, 2020

just set the variable as suggested. nvm will have the node executable somewhere.

chemzqm commented Jan 31, 2020

@LukeAI Make node in your $PATH

lucasdf commented Feb 16, 2020

Cool! Had this same problem after removing the system’s node and replacing it by n node installation.

At the end, the problem happened when my i3 shortcuts were launching NVIM with /bin/sh instead of bash. When using sh my custom node’s bin location was not in the path, since my export command is in bashrc and sh sources .profile instead.

You can debug it by using echo executable(‘node’) which will return 1 if it exists and is executable, and by using echo $PATH to print the environment variables considered by NVIM context.

As mentioned by people above, setting the path by using let g:coc_node_path = ‘/path/to/node’ works. However, you must use the full path /home/xxx/path/to/node .

yujinyuz commented Mar 1, 2020

I also had the same problem. I’m using Fish shell with nvm (https://github.com/FabioAntunes/fish-nvm)

Luckily, fish-nvm provides nvm_alias_command that creates binaries under /usr/local/bin .

So, what I did was I just executed nvm_alias_command node and coc is working again

kirbygit commented Mar 21, 2020 •

My linux pc got corrupted and decided to install ubuntu and had to re-install everything. As I download zsh I encountered this problem. May I ask where can I put this single line?
let g:coc_node_path = ‘/path/to/node’
do I just put that somewhere in coc.vim or am I wrong.

Оцените статью