NPM uninstall packages not working - node.js

can someone help me to identify what the issues is to my cli code when uninstalling the npm packages. When i run this cli code (in the picture below), the npm not unistalling the packages but instead added it to my node_modules. I hope someone in this community can solve my problem and bring any solutions that i can try to solve this weird problem to me.

NPM package is being removed. The one which are being shown as added are already remaining packages. This is the way node shows output in terminal.
To verify, check your pacakge.json, there won't be any package named webpack-config.

Related

How to install a deprecated version of uws

I know that theres a latest version on github (websocket.js) by the same author, but I specifically need a version that works with discord.js. I tried installing a usable version, with
npm install uws#10.148.1
but it doesn't work, it returns this error:
npm ERR! ELOOP: too many symbolic links encountered
I'm also not too sure which versions I should install, as I just started using discord.js.
My questions:
Firstly,
Is there a uws version compatible with discord.js that I can install, and how could I install it?
And if not:
Is there a way to fix this eloop error?
Any help would be appreciated? If I'm not clear, please drop a comment below and I'll try to clarify. Once again, thanks for any help!
I will refer you to these other posts for some detailed information on the subject.
This one involves the error you're referring to so it might be an answer to your problem.
ELOOP Error
This one involves some good information on how to use npm in different ways that may be useful.
npm outdated
I looked up the package and created a test folder to see if I could install the package you're talking about in there using npm i outdated uws#10.148.1.
I then uninstalled it using npm uninstall outdated uws#10.148.1
Everything seemed to work fine besides all the deprication errors and warnings.

When using 'npm' it requires me to login to github

Problem When i try to use npm in any way, ex: npm update or npm i package it immediatly gives me a github login prompt.
What i tried using npm with i, install, and even giving it git directly git://. But none worked sadly.
I am new to Node.js. So far (2 weeks), i have been updating, installing and reinstalling dependencies without a problem. Just now this issue occured.
What i was doing before the error occured was nothing special. Just programming. Last thing i used npm for was to install discord.js npm i discord.js.
Thank you in advance.
to have such a problem, it means your command is wrong. take for example you are trying to install angular cli and you omit the # symbol login will pop like so
npm install -g angular/cli // this will trigger login pop-up
npm install -g #angular/cli // will work fine
so check your command
This issue has been resolved. The problem was very simple but i couldn't figure it out at first.
So what was wrong with my issue here was that i accidently while working on my project changed a value in the "Package.json" file. This is ofcourse not intended. With that, my whole project's 'npm' command was broken where it could't work anymore.
Thank you everyone for your time.

can't update npm (missing access)

Breaking my head to get over that error. I've tried every forum but still I can't find a proper solution. I also uninstalled and reinstall npm and still same issue.
Please save me!
npm error
and also
log
ta!
Just a wild guess:
remove .npm-modules in your home folder
remove modules from the project you are using
npm install, all should be fine
Use homebrew to install npm and nodejs. Write the command as shown below:
brew install node . Once it is successfully installed check it with node -v.
For more details you can go through this tutorial

Cannot find module dtrace-provider

I have a simple nodejs application that is throwing "Cannot find module './build/Release/DTraceProviderBindings'". I look it up online and it looks like that a lot of people are having the same problem when using restify on windows (which is my case, I'm using restify on windows 10). Apparently, dtrace-provider is a optional module for restify and there is no version of it for windows. So, what I tried so far:
Update node to v6.2.0;
Uninstall all modules and run npm install --no-optional;
Uninstall only restify and run npm install restify --no-optional;
And my most desperate move npm install dtrace-provider.
Everything I tried where found on github issues, I've seen same error on OSX users with other modules. Not sure what else to try.
Note: This exception does not stop my application, not even prints the error on the console, I just notice that this was happening using the debugger, in other words, my application runs fine, but this keeps happening on the background.
List of other modules I'm using:
"dependencies": {
"restify": "latest",
"request": ">=2.11.1",
"cheerio": ">=0.10.0",
"xml2js": ">=0.2.0",
"botbuilder": "^0.11.1",
"applicationinsights": "latest"
}
This worked for me after switching to Node 6.1 (and when re-installing node modules didn't work):
Install and save dtrace-provider
$ npm install dtrace-provider --save
Delete 'node_modules' folder
Re-install node modules
$ npm install
I found this thread before combining your attempts with another solution on the Github project issues for restify (https://github.com/restify/node-restify/issues/1093) and simplified best as possible.
I recently ran into this error as well on node 6.11.1.
I ran npm rebuild dtrace-provider and that resolved the problem.
The restify team followed an approach of trying to load the module by requiring it on a try/catch block. You should just ignore the exception.
I had success with the following (elaborate) sequence:
Adjust my path to not have spaces
rm -rf node_modules
rm -rf ~/Library/Caches/node-gyp/
npm cache clean --force
V=1 npm install -S dtrace-provider#0.8.8 --python=python2.7 (repeat this step, resolving as you go, until the install is completely successful … if it fails, check the version - I had rogue dtrace-provider#0.6.0 building at one point)
npm install
At this point everything should have installed cleanly, and I was congratulating myself on a job well done. Then I executed my code and still got the DTraceProviderBindings error. The cause was nested dependencies with the wrong version of dtrace-provider (especially bunyan).
To confirm, do npm list | grep dtrace -B6.
If there's anything lower than 0.8.8, edit package-lock.json, following the method in How do I override nested NPM dependency versions?. Replace requires with dependencies for dtrace-provider and update the version.
Back round to get everything clean: rm -rf node_modules
Then, again, npm install --python=python2.7
I had to iterate round npm list a few times because I thought I'd caught everything and I hadn't.
The key points were to use the required version of python, have a unix-friendly path, and hunt down all nested dependencies. The python version issues gave a big messy error, the space issue gave a much more missable error.
I know this is an old issue but I wanted to comment on it in case anyone else has the same issue I had.
My issue was caused by having parentheses in my path.
/users/karlgroves/Dropbox (Personal)/foo/bar/bat/project...
Moving the project to a path without the parens worked for me.
You'll need to wipe out node_modules and reinstall again.
I recently ran into this error as well on node v8.8.1
as #Derek mentioned, I ran npm rebuild dtrace-provider and that resolved the problem.
tl;dr; dtrace-provider utilized node-gyp which required python version >= 2.5 and NOT 3.5
I had this issue on OSX and found a post that showed using environment variable
V=/Users/your_user/your_project npm i dtrace-provider
This let me know that there was a dependency on node-gyp that was failing to build...Once I knew the issue was with this module was able to focus my attention at troubleshooting node-gyp.
This led to some log output indicating that my python version 3.5 was unsupported and it required version >= 2.5.
Went and downloaded python 2.7.x and checked /usr/bin/python 2.7.x to ensure it was there. Uninstalled the node module that was ultimately requiring this module, then used npm cache clean then reinstalled the module and this time it appeared to pick up the right python version to be able to build.
Hope this helps someone =)
I have tried many suggestions but get the same error again.
Finally, I found the correct way to solve this question.
Go the node.js website and download the latest version of node.js pkg.
After installed, reinstall your software, everything will be ok.
i managed to get this working by running this command
npm install --python=python2.7

NPM uninstall -g yo, yo still works

I'm a noob at my wits end and have already consulted a couple of friends who know (much) more than me. Sorry if these are dumb questions. Hoping you guys can help.
I think it has to do with some weird NPM pathing issues, but I can't figure them out. npm install -g generator-xxx follows through with success, but when I run Yo, no generators are listed.
Tried npm update -g npm - no dice. Npm remains out of date. This is also true of n and most (but not all? I think?) npm modules.
I tried to start from scratch, followed NPM's advice for a complete fresh start. Reinstalled node from node.js's website. Happily, node is up to date, but npm is still several released behind (2.11.3).
The most disturbing part of all of this: npm uninstall -g npm and the packages still work, which makes me think I've got a rogue npm installation rumbling around somewhere in my box, but I cannot find it.
Thanks in advance for your time and consideration!
Node loads modules from several locations by default, and is also influenced by your environment. Take a look in these locations to see if you have modules installed that you weren't aware of.
$HOME/.node_modules
$HOME/.node_libraries
<prefix>/lib/node_modules (where <prefix> is e.g. /usr or /usr/local
Any path(s) in the $NODE_PATH environment variable
./node_modules if it exists in the current directory
../node_modules if it exists
... and so on up the tree, all the way to the root of the filesystem

Resources