Error When Install Node modules in termux shared Storage - npm

Error Screenshot While Trying To Use npm install telegraf in termux shared Storage

Related

PackageCloud unable to install global packages

i was previously using package cloud for work;
i ran curl https://MASTER_TOKEN_GOES_HERE:#packagecloud.io/install/repositories/{privateRepoName}/script.node.sh | bash to set up packagecloud
now that i am not using package cloud i am unable to install any global packages as its only looking for packages within that package cloud repo;
when i try, i get something like: npm ERR! 404 '#aws-amplify/cli#https://packagecloud.io/{privateRepoName}/npm/#aws-amplify/cli/-/cli-4.45.2.tgz' is not in the npm registry.
how do i remove packagecloud from my computer locally.

Verdaccio, npm offline

How do I move Verdaccio from my development machine that has internet into an environment that has no connection? I tried install from a tarball but was still trying to reach out to npm to install? Wish there was an exe installer.
Also when I do npm install -g verdaccio I get a python error node-gyp. Is Python required to use Verdaccio? I don't see that in the documentation
I figured it out. I installed verdaccio with the --no-optional flag and then just copied the files over. I build the storage while online and set cache to true so all the packages copy and all works offline.

Does "npm install" look for packages in local cache first?

I was trying to figure out how local cache is fitted in npm install flow. I did the following:
npm cache clear --force
npm cache rd
npm install react#16.10.1
I disconnected from the internet
I removed the node_modules directory
npm install react#16.10.1
The package got installed and a package-lock.json was created successfully; however the following warning in the console made me confused:
Using stale data from https://registry.npmjs.org/ because the host is inaccessible -- are you offline?
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
...
...
Why did npm try to connect to the registry at all while the package does exist in the local cache? and
What was npm trying to get from the registry? Did it try to download the whole package or it just wanted to check some metadata like hash or so?

npm ERR! Maximum call stack size exceeded on Linux

I use npm to install new component built by ReactJs. I can successfully install it on local windows machine. However, when I tried to use AWS codeBuild to build my client project, I encountered the following error in virtual machine:
npm ERR! Maximum call stack size exceeded
My npm version is 6.4.1.
When the build starts, the build process actually download npm and start to install packages based on package.json. So it is like to install packages on brand new machine.
I've tried to search online to see if there is anything similar and I couldn't find any solution.
Just plain 'npm install'

What is url for npm packages repository?

I have installed node js and npm on my windows But when I try to install npm modules(packages) using
command>>npm install -g xxxx(package name)
It doesn't get installed, and it asked me to check proxy setting. As I am working on private network, so may be it doesn't allow me to access the url from which npm packages get downloaded.
Please tell me what is url for such npm packages from where it gets downloaded so that I can ask my network provider to give access for that site.
NPM packages are downloaded from https://registry.npmjs.org unless otherwise configured.
You can get the download URL for a package with npm view, for example JQuery:
npm view jquery dist.tarball
returns: https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz
You can change the default registry with npm set registry <new url>; this is typically used in large institutions or corporations with an internal registry mirror.
All npm packages are in fact downloaded from GitHub. However, npm resolves those GitHub dependencies via https://www.npmjs.com.
For example, express https://github.com/expressjs/express is the download link.
npm install -g express (or without -g).
The system does not know the GitHub location of the express package. So it must first lookup https://www.npmjs.com to get GitHub url. Then it will clone the package.