The target “/t:native_metrics” does not exist in the project - javascript

I am trying to run npm install but I am getting the following error:
node_modules\#newrelic\native-metrics\build\binding.sln.metaproj : error MSB4057: The target "/t:native_metrics" does not exist in the project.
I tried a few suggested solutions like: completely uninstalling nodejs (I also removed all the leftover folder in AppData), I tried downgrading node-gyp to an older version rather than the latest. I tried this solution here: The target "/t:native_metrics" does not exist in the project
I also uninstalled and installed Python2.7 but that didn't help. I removed and installed Windows Build Tools but nothing. I also removed all the npm, npm-cache and .node-gyp folder and that didn't do the trick.
I am not getting the error when I run npm install on two other machines.
Anyone have any suggestion before I do a clean install of my Windows?

Related

Error when Installing dependencies on a React project (node)

Hello I am currently stuck with a task that is given to me. The problem is that I am unable to install dependencies when running npm install which means that I am unable to run the website locally which is my main goal
There are many versions of this question in the internet but I am not really sure what the main cause of this therefore the title of this question
you can view my error logs here
https://www.codepile.net/pile/4qL4NOq0
I have also tried some solutions that I have seen on the internet such as:
reinstalling node
deleting node_modules and package-lock.json and re-npm install (this is when I have installed the node_modules but still unable to run the website locally)
installing grpc globally
The version of grpc that you are installing (1.23.3) does not support the version of Node.js that you are using (16). You will need to use a newer version of grpc (the latest is 1.24.11) or an older version of Node to get that to work.
Please note that the grpc package has been deprecated in favor of the #grpc/grpc-js package. It is recommended that you use that one instead if possible.

NVM not installing on Ubuntu 21.04 Terminal

I've been having issues with upgrading my version of Node.js recently and one of the ways I've tried was with node version manager. When I install the install_nvm.sh file with curl -sL https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh -o install_nvm.sh and ran bash install_nvm.sh, I get this error:
install_nvm.sh: line 1: 400: : command not found
My version of Node is on 12.21.0 and NPM is on 7.18.1. This started when I tried to download a dependency called "yt-search", but it said that it depended on a vulnerable version of "cheerio", "css-select" and "css-what". I tried to install each of them one by one to their recent versions, but the error still was there. I had to reinstall my terminal over 10 times to attempt to fix this because when I went further, the errors started to pile up.
Like what frozen said in the comments, upgrading it to 2.9.0 solved the issues!

Error installing npm package 'kurento-client' (BufferUtil ~ node-gyp rebuild)

I'm trying to install a package 'Kurento-client' via npm but it gives error in installing its own dependencies (bufferutil and utf-8-validate). Error also mentions 'node-gyp rebuild'
Here is the screenshot of the error:
Can you please tell, what should I do or change?
When I install those 2 dependencies separately (bufferuil and utf-8-validate), they install successfully with the latest version.
But the Kurento-client is installing their old version. I don't know why. I need only kurento-client to be installed.
After searching for a while, I solved it by dropping the npm version. The reason is that some packages have dependencies which they need to install, and in our case, those dependencies were of the old version which cannot correlate with the newer version of npm. Either you have to update those ones separately or drop your npm version. Hope it helps someone!

Node installed but node cannot be found in Ubuntu VPS

I installed node via NVM. I installed node 0.10.32. using NVM 0.25.0
When I do node -v I get
-bash: /root/.nvm/v0.10.32/bin/node: No such file or directory
when I do npm v I get
/root/.nvm/v0.10.32/bin/npm: 2: exec: /root/.nvm/v0.10.32/bin/node: not found
All those directories exist and node executable is in it but they are reading as not found. Node seems to be installed but I am unable to use it. I am not sure how to fix this issue. Any ideas will be greatly appreciated
Check that your ~/.bash_profile has this:
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
https://github.com/creationix/nvm/issues/576
A lot of things can be wrong here from what you describe. Generally I don't recommend using nvm to install Node on servers. It works fine for your own work on a local machine but when you need to be sure what is installed and where, I recommend doing a real installation.
I recently wrote a tutorial on how to install Node on Linux:
https://gist.github.com/rsp/edf756a05b10f25ee305cc98a161876a
It is specifically about version 6.7.0 but just change the version number to use any other version of Node.
You can see other answers showing how to install Node properly and troubleshoot if it isn't installed correctly:
Run npm as superuser, it isn't a good idea?
node 5.5.0 already installed but node -v fetches with "v4.2.1" on OS X & homebrew?
Just get the binary or source package of the version that you need, install it where you want and it will work. The most reliable way is to install a source package because you can run make test before you install and because npm will have the correct shebang line (which may not always be the case with binary distribution - which, incidentally, is also used by nvm). No need to use nvm or any other tool to do that.
The nvm is great if you need to quickly switch Node versions during development on your local machine but if you want a reliable way to install Node on the server then it's best to install it normally.

Error: Module did not self-register.

Server: Ubuntu server 14.04
Node: v4.2.6 LTS
npm: 1.3.10
I pullled my colleage's work from git remote. He made the node_modules as .gitignore. So I have to npm install the modules.
But after a successful install of npm. when I try to start the project using mocha. It remind me of a module didn't self-register
The error comes from the module of Bcrypt.
at bindings (/base_dir/node_modules/bcrypt/node_modules/bindings/bindings.js:76:44)
I don't want to downgrade my node to 0.10, because, I can't use JS promise in that version. Somehow, JS promise is a must in my work
This problem happens mostly because you copied/cloned the repository from somewhere else, but some modules for nodeJS should be installed/registered locally on your machine, during which the happens the build process(maybe some native language like C).
and be noted that the node_modules folder should not be staged for versioning. and should be ignored by versioning tool. and the one who is trying to clone this package should build / install firstly.
I find the answer to this problem.
But plz don't devoted this just because you want.
I upgrade the NPM using
npm install npm -g.
after that, delete the node_modules folder,
then,
npm install
Everything will be good.
I had this issue while setting up my Cypress project.
After trying to delete and then reinstalling all the node-modules and upgrading everything I found out the issue was caused because Cypress uses node from its bundle version by default (which was version 8.0 in my case) , whilst the package I wanted to use required the node version to be 10 or higher.
I did have node 12.0 installed on my machine but since cypress was not using that I had to add the line shown below in the settings file (cypress.json) to set the value for 'nodeVersion' to 'system', this way you are telling cypress explicitly to use the node version installed on your machine.
Add this line to your settings file:
**"nodeVersion": "system"**

Categories

Resources