npm search hangs on windows 8.1 - npm

I am trying to figure out a problem with WebStorm 8's NPM UI tool. I have come to a point that running "npm search" command line actually hangs. That is what the UI tool runs initially. I am running Windows 8.1. I have also tried running the same command in Windows 7. It actually returns an error running the "npm search" command. I really want to run WebStorm with NPM on windows 8.1.

Same issue on OSX 10.9.4. Via command line, 'npm search' fails with "FATAL ERROR: JS Allocation failed - process out of memory". Via PHPStorm, it just hangs.
If I add an argument after npm search in command line, it works fine.

I don't think it is a Windows only problem. Instead it looks exactly like this reported bug: npm.commands.search fails and dumps 100+ Mb to output log
I can reproduce it on Linux with npm 2.0.2 by simply calling
npm search
(It just hangs and allocates huge amounts of memory)
To quote from the bug report:
We're treating the combined metadata for all packages in the registry as an in-memory database backed by a JSON file. It's already a hefty wad of data to download, parse, and keep in memory, and as the number of packages in the registry grows, it's going to cause more and more problems, especially in resource-constrained environments
Let us hope they can fix it soon.
(Another related bug report is npm search" runs out of memory and dies without good error. Looks like a duplicate to me.)

Related

VSCode WSL - Installing VS Code Server for x64 - FAIL

Can anyone decode the following for me?
WSL was working perfectly on C++ a few weeks back.
Switched to try to run older Python under windows (not WSL) and it seems all twisted up now.
Can't get Win10 nor WSL to run. Keeps trying and failing to update. I re-ran the WSL and updated VSCode on the windows side. I AM behind a proxy but as far as I know, I've update all the files that google searches pointed me at. Pretty frustrated and would appreciate any help there is.
"
Request downloadRequest failed with message: getaddrinfo ENOTFOUND update.code.visualstudio.com. Will try to download on WSL side."
"
[2022-02-10 13:51:09.374] Setting up server environment: Looking for /home/ubuntu/.vscode-server/server-env-setup. Not found.
[2022-02-10 13:51:09.374] WSL version: 4.4.0-19041-Microsoft Ubuntu-20.04
[2022-02-10 13:51:09.374] Updating VS Code Server to version d6ee99e4c045a6716e5c653d7da8e9ae6f5a8b03
[2022-02-10 13:51:09.374] Removing previous installation...
[2022-02-10 13:51:09.674] Installing VS Code Server for x64 (d6ee99e4c045a6716e5c653d7da8e9ae6f5a8b03)
[2022-02-10 13:51:09.674] Downloading:
[2022-02-10 13:52:43.314] VS Code Server for WSL failed to start. No messages received for 90s
[2022-02-10 13:52:43.314] For help with startup problems, go to
[2022-02-10 13:52:43.314] https://code.visualstudio.com/docs/remote/troubleshooting#_wsl-tips
[2022-02-10 13:52:43.328] WSL Daemon exited with code 0
"
I'm not 100% which step fixed it however I was able to proceed after.
Launching C++ project in wsl also tried to update and failed. The difference being that the install button did actually install the wsl server update w/o fail. So that error was gone.
I then launched another VSCode session with the Python project and the cmd terminal. I then had to use this help (https://github.com/pypa/pip/issues/9216#issuecomment-741836058) to adjust the proxy.
I could then proceed to reinstall ipykernel which is what had stopped working and was blocking me.
I'm pretty sure my environments are conflicting with each other. I'm afraid I don't understand VSCode environments well enough and very likely caused this problem for myself.

lb4 command is not found in Windows 10

I have install loopback 4 framework in my system by this command npm i -g #loopback/cli. But after installation by terminal I, can't create loopback application because it showing lb4 command not found. I also search through web and do many changes in environment variables but got same problem. I have executed this command with different terminal and same problem is getting.
I have attachments which will help you to understand the problem
I am running this command on command prompt in windows 10 system
This can occur for several reasons; Typically, it's caused by a misconfigured PATH variable or a stale "cache" of the terminal. A quick solution is to use npx #loopback/cli instead.

An unexpected error occurred: "EPERM: operation not permitted in Yarn

I am having problems installing new npm packages with Yarn. Every time I go on to add a new package it's throwing me this error. But when I delete my node_modules folder and run Yarn, everything works fine. Again when I try to add another package, it throws me the same error. Any solutions, I am having a headache right now.
In Windows first stop the development server and then try to install package.
I had same problem, I went into the Task Manager (CTRL+SHIFT+ESC) and killed all the NodeJs processes.
Press "Ctrl+C" to stop the server and repeat the installation.
if you're using visual studio code, cmd, or Windows Terminal, close it and run it in administrator mode. Usually, the reason for that error message is a result of limited privilege giving to the editor or npm or Yarn if you're using that.
This is likely due to you creating your project within the windows /mnt directory structure
Rerun inside the ~/home folder
(accessible within windows # //wsl$/
did you try to open CDM as run as administrator or if with wsl terminal try to use sudo like sudo yarn
The package I was trying to install before haveing this issue was yup. So resulted to
yarn add yup --legacy-peer-deps
which worked.
Sometimes when this occurs, you may first try to uncheck node_modules folder to read only.
If it is not working try to stop the running server and install your packages and then restart the server.
Terminate or stop the server ( close and reopen Vscode) and try agin. this will work for me !!
Restarting the system which causes stopping all the processes by Node, VScode, ... solved the problem.

Why is npm development server startup slow in emacs terminal mode?

I'm just getting back into trying some front end projects for the first time in a few years. Many npm-based javascript projects I try out end up taking a long time to start up in development mode even for Hello World-ish examples. In particular I'm trying out Nuxt.js.
Dev server startup takes about 100 seconds, and nothing seems to get cached so restarts (not hot reloads) take the same amount of time. My research into the project and known npm issues did not turn up any definitive root cause or ways to improve this yet.
I'm using emacs 26.1 in terminal mode on a 2018 13" MacBook Pro with a core i5, 8 GB of ram, and an SSD.
When I run npm run dev to startup the nuxt dev server I get repeated error in process filter: Args out of range: "\342", -1 errors related to some unusual characters they are using to try to make the output pretty. If I try the same thing in a vanilla Mac OS terminal the server startup goes 10x faster. Why do those errors occur, and why is it so much slower in an emacs terminal?
It turns out the repeated error in process filter issue may be caused by a bug in term mode that was recently fixed but might still be an issue in my version of emacs.
As a workaround, the following can get the nuxt dev server running in ~10s instead of ~100s in an emacs terminal on my mac by filtering out the repeated lines about the modules being built:
$ npm run dev | grep -v modules
Note that I tried using npm's options to adjust the log level but none seem to filter this output. If anyone knows a more "official" way of filtering this, or even better, if you know how to make it such that it doesn't try to rebuild the modules on every dev server start up, I'd be interested to know.
Edit: it might make sense to adjust the dev script command in the package.json file to include the grep filter, that way you can still just type npm run dev and get the workaround.

All ide from JetBrains launch extremely long on Arch Linux XFCE4

I have just installed fresh Arch Linux with XFCE4 and downloaded WebStorm. I did everything exactly as it is said in howto file (by executing .sh from bin folder). When i click on the WebStorm icon it looks like nothing is happening but suddenly after around 90s (and its min. value, i wonder how long it would be including project loading..) window pops up showing loading process.
I have pretty strong laptop with i7, 8gig of ram and SSD. There isn't any project loading also. It's fresh start. It used to work on Xubuntu, but it seems like i missed something during installation process or I dont know..
It's recommended to use OracleJDK not OpenJDK.
And try to trace what is happening while loading from terminal because if there is any error it will appear immediately.