I have nodejs installed, along with npm, but when I run anything using npm, the terminal just sits there. No output. I have to force npm’s process to quit because Ctrl+C doesn’t work.
It had been working before for a while, but I did some system maintenance by moving the OS from one system to another, and after that,
The OS is a container running on a Fedora server. Moving an LXC is usually as simple as tar the directory, move, and untar. The system it was on before this one was a Fedora workstation.
I was worried updates broke it, but I uninstalled nodejs and npm then reinstalled and I still have the same issue.
Restarting the server hasn’t fixed it either. Any help is appreciated.
Containers mean snapshots are fairly easy-mode so usually this wouldn’t matter as much. I’d just roll back to a snapshot.
However, getting the container working on the Fedora 26 Server OS took time and I can’t be 100% that rolling back to the last snapshot I made would be painless, so I figured I’d get everything working again and start fresh with snapshots to go with the new host.
I agree it’s not, but for my purposes, this isn’t a production machine.
Hmm, everything this found, I deleted: find / -name *npm* after uninstall nodejs and all it’s related packages (including npm). Then cleared pacman cache.
You know, funny thing about that. That ended up being my issue. However, it’s the opposite.
If I try to run npm as root or with sudo, it locks up as I’ve mentioned. If I run it as my normal user (who is part of the wheel group), it works fine.
I believe I ran npm as my user originally, but I can’t be sure why I ended up doing that, other than root causes it to fail.
I’ve tried it on various snapshots of my container, and all of them do it, but running npm as my regular user solves my problem in that NPM will actually respond when used, however my user lacks write access to the location I was installing npm modules, so … not sure how it’s ended up like this.
And I’ve removed the solution because the symptoms have changed.
Now if I do npm -v, it completes but doesn’t return anything. Completes means it doesn't force me to kill the process.
I’m now attempting a reinstall of npm’s modules with npm install, but if I do this with my normal user, it gives output (i.e. a progress bar, scripts running, etc). If I do it with root, it gives nothing and it usually takes a bit, so I can’t be sure it’s not doing stuff.
I wish there were an error log for npm, but all I’ve seen is a module for errors which doesn’t help if the errors are with npm itself.
Frustrating, because I don’t know what changed to let basic commands complete without output.
Well, I want AJAX auto-updating tables. Meaning, no page refreshes are necessary for tables to show new information.
See this thread:
The J in AJAX is JavaScript, and I’m also using Laravel PHP framework in building the website.
I’m glad you asked that question though, because the reason I was using NodeJS is because that’s what the tutorial I was following to learn Laravel’s basics used. Now that I look for alternatives, I find this page:
Mainly the fragmentation, ridiculous dependencies and configuration requirements, and rube-goldbergian nature of everything in frontend right now.
The joke is often “JS is an acronym for Job Security” because there’s no clean method for anything and best practices and standards either don’t exist or just plain aren’t followed by the majority of people depending on what you’re trying to build. It’s often easier to keep a shitty JS employee than try and find someone who can decipher their spaghetticode.
Nothing more nightmarish than trying to work out how the last guy got all his JS duct taped together and somehow functional. There’s a new esoteric framework with unique gotchas and incompatibilities made every day, and these trends are only accelerating.