eslint_d: command eslint_d is not executable (make sure it's installed and on your $PATH) - eslint

[null-ls] failed to run generator: ...site\pack\packer\start\null-ls.nvim/lua/null-ls/loop.lua:157: command eslint_d is not executable (make sure it's installed and on your $PATH)
Recently, I installed Devaslife's nvim config. For some reason, I get this error whenever I get into the index.jsx file from my NextJS project. What does this error imply? How to fix it?
PS: The linter doesn't work indeed

Are you using mason.nvim? Have you installed eslint_d from within mason itself? Try opening up the mason UI with :Mason and check if eslint_d is installed. If you didn't install it, do so with :MasonInstall eslint_d

The reason is that eslint_d is not installed in your system and also not added to $PATH. You can try with mason or you can try with the npm package npm install -g eslint_d. The npm one fixed the issue for me.

Related

-bash: node: command not found [duplicate]

I'm learning laravel and follwing this tutorial,
But when I went try and install npm, is says bash: npm: command not found
If you have already installed nodejs and still getting this error. npm: command not found..
run this
apt-get install -y npm
I also come here for the same problem, The solution I found is to install npm and then restart the Visual Studio Code
in redhat base OS (tested in centos 7)
yum install nodejs npm -y
in debian base OS
apt-get install -y npm
I am following the same tuturial and I had this issue and how I solved is just download the
8.11.4 LTS version
from this link then install it then the command worked just fine!
I know it's an old question. But it keeps showing in google first position and all it says it's "install node.js".
For a newbie this is not obvious, so all you have to do is go to the node.js website and search for the command for your linux distribution version or any other operating system. Here is the link:
https://nodejs.org/en/download/package-manager/
In this page you have to choose your operating system and you'll find your command. Then you just log into your console as a root (using putty for instance) and execute that command.
After that, you log as normal user and go again inside your laravel application folder and run again npm install command, and it should work.
Hope it helps.
The solution is simple.
After installing Node, you should restart your VScode and run npm install command.
If you already installed npm globally on your system, and you are still getting the above error message by using VSCode terminal. Just close your VSCode application and reopen again, that should resolve the issue.
First You need to check the node version using terminal (not gitbash)
node --version
npm --version
if those exists, Restart your pc and check
Cheers !!
In my case it was entirely my fault (as usual) I was changing the system path under the environment variables, in Windows, and messed up the path for Node/NPM. So the solution is to either re-add the path for NPM, see this answer
or the lazy option: re-install it which will re-add it for you.

bash: npm: command not found?

I'm learning laravel and follwing this tutorial,
But when I went try and install npm, is says bash: npm: command not found
If you have already installed nodejs and still getting this error. npm: command not found..
run this
apt-get install -y npm
I also come here for the same problem, The solution I found is to install npm and then restart the Visual Studio Code
in redhat base OS (tested in centos 7)
yum install nodejs npm -y
in debian base OS
apt-get install -y npm
I am following the same tuturial and I had this issue and how I solved is just download the
8.11.4 LTS version
from this link then install it then the command worked just fine!
I know it's an old question. But it keeps showing in google first position and all it says it's "install node.js".
For a newbie this is not obvious, so all you have to do is go to the node.js website and search for the command for your linux distribution version or any other operating system. Here is the link:
https://nodejs.org/en/download/package-manager/
In this page you have to choose your operating system and you'll find your command. Then you just log into your console as a root (using putty for instance) and execute that command.
After that, you log as normal user and go again inside your laravel application folder and run again npm install command, and it should work.
Hope it helps.
The solution is simple.
After installing Node, you should restart your VScode and run npm install command.
If you already installed npm globally on your system, and you are still getting the above error message by using VSCode terminal. Just close your VSCode application and reopen again, that should resolve the issue.
First You need to check the node version using terminal (not gitbash)
node --version
npm --version
if those exists, Restart your pc and check
Cheers !!
In my case it was entirely my fault (as usual) I was changing the system path under the environment variables, in Windows, and messed up the path for Node/NPM. So the solution is to either re-add the path for NPM, see this answer
or the lazy option: re-install it which will re-add it for you.

Can install but can't run npm packages

I'm having trouble with my node.js/npm setup,
I freshly installed it via the website and it worked fine.
It told me to make sure /usr/local/bin/npm has to be in my path and when I run
echo $PATH it is in there, so it should be fine.
I can now install packages (tested with npm i webpack -save-dev) the installation works as expected, without any errors.
But when i run webpack all It is giving back is command not found has anyone experienced
something like this before?
I believe what you are looking for is a global package install.
Try using
npm i -g webpack
You can get help on install with
npm help i
Did you install node v8/npm v5?
In that case, it seems there's an open big-bug ticket on the npm repository.

npm hangs on postinstall / unlock

I have a Linux server that runs some virtual Machines using KVM. Host machine is a Debian derivate with kernel 2.6.32-32(-pve).
In roughly 75% of the times I run npm install, it hangs while installing modules. I ran it in silly debug level and it always hangs at the line
npm info postinstall [module name] (older npm versions)
or
npm verb unlock done using [...] (newer npm versions)
forever.
It happens in every project on the host machine and on the virtualized systems for every node and every npm version I have tested (a lot, including the newest ones (2.7.x atm)).
It also is not deterministic. Sometimes it works, sometimes not and most of the times it hangs on a different module.
On my dev machine (which is in the same network, running OS X 10.10) it works fine.
I am not behind any kind of proxy.
What could possibly be wrong here?
EDIT: For the time being I solved this problem by checking in all my dependencies as gzipped files using https://github.com/JamieMason/shrinkpack
I was having the same issue for several hours, and couldn't work out what the problem was. I tried re-installing everything a few times, manually installing individual modules, switching from x64 to x86 versions of NodeJS, etc, and got nowhere.
In the end, I changed networks, from WiFi over ADSL2+ [~2mbps] to 4G Hotspot [~20mbps] and it worked in 30 seconds. No idea why, since it didn't seem like a network speed issue, but it solved the problem.
Hope this helps someone else, too!
I had the same problem on our Jenkins slaves based on Ubuntu, and it was solved by upgrading npm.
Default npm installed by apt-get has version 1.3.10 now, which is very old (shown by npm --version). There are at least two ways to upgrade it:
Run sudo npm install -g npm command. If you want to install a specific version you can run append it at the end of command: sudo npm install -g npm#2.1.3.
Or you could add NodeSource repositories using these instructions and run usual sudo apt-get update.
I have the same problem on Windows. I deleted my npm-cache folder and reinstalled npm. Everything started working normally after that.
The npm-cache folder can be found at
<your-drive>\Users\<your-name>\AppData\Roaming\npm-cache
Remember to turn on 'View hidden files because the AppData folder by default is hidden
You can reinstall npm by using the command,
npm i npm -g
On Windows make sure you are in a native CMD (not in VSCODE or whatever IDE). Also, try increasing the max memory limit for node:
set NODE_OPTIONS=--max_old_space_size=8096
I did the same, switched my network from WiFi to 3G and it worked.
I'm experiencing the same problem, this is the issue on Github:
https://github.com/npm/npm/issues/7862
There are some useful tips that seemed to help a few people.
For me doing $ npm install -g node-gyp (as suggested here: http://gangmax.me/blog/2013/05/13/resolve-npm-update-node-gyp-hung-problem/) fixed the problem.
I had the same problem and just run
npm cache clean
And it works!
Had this same problem in Windows. The solution was to restart after installing node and npm and then run command prompt as administrator.
In my case, a system restart did the work.
I ran npm install --verbose which suggested some lock on a file in npm-cache. And I think the system released the file (which was under use) after the system restart. I am using windows.
Try cloning the project again and then run npm install to install the packages in your terminal.
I ran into this with npm v6, and it turned out I was just being impatient. I just needed to wait a little longer and it proceeded to the next step.
npm cache clean --force
works for me :)
=> this method working with me When npm block in installation Package for IONIC installation and ReactNative and another package npm.
you can change temporary :
npm config set prefix C:\Users[username]\AppData\Roaming\npm\node_modules2
change the Path in Environment Variables set C:\Users[username]\AppData\Roaming\npm\node_modules2
Run the your command to install your package .
open file explorer copy the link C:\Users[username]\AppData\Roaming\npm\node_modules
ok file yourpackage.CMD created another folder Created "node_modules2" in node_modules and contain your package folder.
copy your package file CMD to parent folder "npm"
copy your package folder to parent folder "node_modules"
now run npm config set prefix C:\Users[username]\AppData\Roaming\npm
change the Path in Environment Variables set C:\Users[username]\AppData\Roaming\npm
now package working correctly with Command line

Problem installing socket.io on Fedora Core

I'm trying to install socket.io on my machine, but I keep encountering errors when I run npm install socket.io as directed on their website. I'm not sure if I have version incompatibilities for npm or node.js or if I'm simply missing something obvious. As far as I can tell, I have the most recent stable version of both of them.
When I run the install command, the console outputs 40+ errors, and at the end I am given the line npm not ok. Any ideas as to what is going wrong?
What is the error?
Are you installing npm using code from git? I can only guess that you are not using a stable code, because the master branch from git is often unstable.
If that is the case, what you can do is to get the latest code from the git repository and install it again.
$ cd npm
$ git pull
$ make install
Hope it will solved your problem.
You need to provide an error log if you want anyone to try and troubleshoot your problem. It would also be helpful to know whether you installed Node and NPM from source or RPM. Furthermore, if you installed from source, did you do a standard install or did you make customisations?
If you are able to start from scratch, I suggest following the steps below and seeing how you go. Installing into your home directory won't require root and it makes it easier to clear everything out if you need to start again.
Install the stable release of Node in your home directory (use ./configure --prefix=~/Node/)
Set your path as appropriate (ie. PATH=/home/user/Node/bin:$PATH)
Run the standard NPM installer (curl http://npmjs.org/install.sh | sh)

Resources