Wednesday, May 11, 2022
[NODEJS] Covert wiki text to html
Wednesday, May 19, 2021
How to install nodeJS and npm in non-admin access Windows machines
We all feel the great pain of installing any software when working on an office workstation or laptop. We will not be given admin rights and almost all of the software requires admin privileges to get installed in Windows PC. Because they require to have an entry in the RegistryEditor and need to write data under some system folders and etc.,
So here’s some trick to get the nodeJS one of the most wdely used programming language and npm, the nodeJS package manager in any Windows machine without the admin-rights.
Step 1: Download the nodeJS.exe file from https://nodejs.org/en/download/ by clicking on All download options
and choose the right Windows architecture and download it.
Step 2: Choose a folder to for nodeJS. For example, C:\ProgramData\Applications\nodejs
and save the downloaded file under this folder.
Step 3: Add the nodeJS folder to the environment variable PATH
by executing the below command in the cmd.exe
, or using the User Interface.
set PATH=C:\ProgramData\Applications\nodejs;%PATH%
Step 4: Now download the stable version of npm
from the below link by replacing the version.
https://registry.npmjs.org/npm/-/npm-{VERSION}.tgz
For example for npm version 6.4.1, https://registry.npmjs.org/npm/-/npm-6.4.1.tgz
Step 5: Now unzip the downloaded npm file anywhere and cd
into package
folder.
Step 6: Execute the following command in the cmd.exe
node bin/npm-cli.js install npm -gf
Step 7: Execute the following commands to verify the installation of nodeJS and npm.
node -v
npm -v
Well, you have installed nideJS and npm successfully in a Windows machine without admin rights. Its time to celebrate now.
REF: https://medium.com/@github.gkarthiks/how-to-install-nodejs-and-npm-in-non-admin-access-windows-machines-102fd461b54c
Tuesday, May 18, 2021
[BUG] Missing required argument #1
The error
npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror http://github.com/npm/npm/issues
Solution
We fixed this by updating to the latest version of npm as a RUN command in our Dockerfile
RUN npm install -g npm@latest
Ref: https://github.com/npm/cli/issues/681
Can't update npm to newest version on Ubuntu
First, I install npm
sudo apt-get install -y npm
Which installs npm version 3.5.2. Then I try to update it to newest version and it fails. Could not find a proper solution for this.
sudo npm install npm@latest -g
▌ ╢░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine npm@7.5.2: wanted: {"node":">=10"} (current: {"node":"8.10.0","npm":"3.5.2"})
WARN engine npm@7.5.2: wanted: {"node":">=10"} (current: {"node":"8.10.0","npm":/usr/local/lib
└── (empty)
npm ERR! Linux 4.15.0-135-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "npm@latest" "-g"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! path /usr/local/lib/node_modules/.staging/@npmcli/ci-detect-c7bf9552
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/@npmcli/ci-detect-c7bf9552' -> '/usr/local/lib/node_modules/npm/node_modules/@npmcli/ci-detect'
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/@npmcli/ci-detect-c7bf9552' -> '/usr/local/lib/node_modules/npm/node_modules/@npmcli/ci-detect'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /home/some/path/npm-debug.log
npm ERR! code 1
Sulution
I had the exact same issue, after some research I found this post. Several options are given in this article, Option 1 with nvm installation worked for me.
sudo apt update
sudo apt install build-essential checkinstall libssl-dev
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.35.1/install.sh | bash
nvm --version
nvm ls-remote
nvm install [version.number]
More info in this post: https://phoenixnap.com/kb/update-node-js-version
REF: https://superuser.com/questions/1623517/cant-update-npm-to-newest-version-on-ubuntu
Install and use xorg-server on macOS via Homebrew
The instructions to install and use xorg-server on macOS via Homebrew: Install Homebrew (if you haven't already): /bin/bash -c ...

-
Ref: https://blogs.sap.com/2016/11/25/get-to-know-camels-simple-expression-language-in-hci/ Introduction Simple is a, well, simple express...
-
WebRequest The function sends an HTTP request to a specified server. The function has two versions: 1. Sending simple requests of typ...
-
Important note about OLE automation: OLE automation interface is provided to control AmiBroker from the OUTSIDE process (such as windows ...