nvm use giving Execution of the Windows Script Host Failed error - cmd

I have got two node version installed using nvm.
When I am trying to switch to other I am getting below error
Looking at some solution, I added "Enabled" to the registry location
HKEY_CURRENT_USER\Software\Microsoft\Windows Script Host\Settings\Enabled
but it did not fix it.
Also I tried running this in Administration access cmd window.

Related

Azure functions throwing error when trying to debug on MacOS

Trying to debug an Azure functions project.
On the mac clicking F5 and starting the debug.
And the output is this :
[2021-07-25T08:47:57.429Z] Cannot create directory for shared memory usage: /dev/shm/AzureFunctions
[2021-07-25T08:47:57.434Z] System.IO.FileSystem: Access to the path '/dev/shm/AzureFunctions' is denied. Operation not permitted.
Value cannot be null. (Parameter 'provider')
Has anybody encountered this before and know how to fix this ?
I tried running visual studio code with administrator permissions like this :
sudo open ./Visual\ Studio\ Code.app
Also tried to mkdir the /dev/shm directory but it just keeps giving this error.
What should I do ?
Solution was adding --verbose mode and see the logs. The problem was that azure didn't support node version 15. Downgraded nodejs to version 13.12.0 and it worked.
Step 1: Downgrade nodejs to 14.x
https://nodejs.org/download/release/v14.19.0/
Step 2: run in verbose mode
Open terminal, change to api folder, and enter the below command
func start --verbose

How can I resolve a package installation error in Julia on Windows?

I have just started using Julia on a Windows 10 machine, and I have been trying to install some very basic packages. When I use the Pkg.add() command, however, the command window returns the following error:
ERROR: SystemError: opening file C:\Users\username\.julia\environments\v1.0\Project.toml: Permission denied
The error message pops up even when using the Administrator mode. Any advice or tips would be appreciated! Thanks!
Delete .julia folder or set a new location for the JULIA_DEPOT_PATH.
Once done use a non-administrator account (the one you normally work with) to reinstall packages.

Docker "Can't add file <path> to tar: readlink <path> The system cannot find the file specified"

I'm a beginner at docker trying to get it working on my Windows 10 machine using creator's update bash subsystem. My dockerfile builds fine on my mac, but when I try docker build from the same file on windows, I get errors like the following:
time="2017-08-28T14:44:36-07:00" level=error
msg="Can't add file \\\\?\\C:\\Users\\username\\Workspace\\...\\node_modules\\.bin\\nodemon
to tar: readlink \\\\?\\C:\\Users\\username\\Workspace\\...\\node_modules\\.bin\\nodemon:
The system cannot find the file specified."
This is printed out for all of my node_modules dependencies. My first question is: What is triggering this "add" operation for all of my node_modules? These error messages are printed out before the first line of my dockerfile is executed
Step 1/25 : FROM ubuntu:14.04
Second, does this issue have something to do with different paths in windows? To me, the weirdest part about the errors is the strange path \\\\?\\C:\\Users\\username. What is going on here with the excessive slashes and a question mark in the path?
Third, is it just me? Or does everyone encounter problems when using docker on windows bash subsystem?
NOTE: I've tried setting up the Docker Toolbox and running the quickstart terminal. I get the following error from running the quickstart terminal
Error with pre-create check:
"This computer is running Hyper-V. VirtualBox won't boot a 64bits VM when Hyper-V is activated. Either use Hyper-V as a driver, or disable the Hyper-V hypervisor. (To skip this check, use --virtualbox-no-vtx-check)"
Looks like something went wrong in step ´Checking if machine default exists
´... Press any key to continue...
So I've tried making sure hyper-v is enabled from this article here
NOTE 2: I've also made sure that my C drive is shared with my containers

CouchDB will not install as a service on Azure Windows VM

I have previously installed CouchDB on my Azure Windows VM (Classic) without any problems using the installer setup-couchdb-1.6.1_R16B02.exe downloaded from http://couchdb.apache.org/
Today I have uninstalled the existing CouchDB installation and service with the intention of installing it again from scratch. Unfortunately, whenever I run the installer now it fails to create a windows service. More info:
I am running the installer and the command tool as Administrator
I have removed existing services using the SC command and by editing the registry (tried both methods)
I have tried creating the service after installing CouchDB using the installer by running the command:
erlsrv.exe add "Apache CouchDB" -workdir "%COUCH%\bin" -onfail
restart_always -args "-sasl errlog_type error -s couch +A 4 +W w"
-comment "Apache CouchDB 1.6.1"
This seems to create a service (which you can see in the Windows Services) but any attempt to start the service results in an error:
Windows could not start the Apache CouchDB service on Local Computer.
Error 1067: The process terminated unexpectedly.
I have tried uninstalling the CouchDB application, restarting the server, re-installing CouchDB using the installer again. No joy. Also then tried running the command to create the service. Still no joy.
When I use the command
erlsrv list
I can see the services that I've tried to add in the past. Any attempt to remove them results in the error message:
erosrv: Unable to remove service (not enough privileges?)
Error: The handle is invalid
(I am using the handle as provided by the erlsrv list command)
there are no events in the events log that I can find that explain why this is failing
How can I get CouchDB to install as a service correctly?
TL;DR: Re-install in a directory path with no spaces in it, then manually create the service.
OK so at some point in my Googling today I came across this answer which gave me the clue that I should install in a path without spaces in it. So my solution was to:
uninstall the CouchDB application via Windows Control Panel.
run the uninstall.exe in any remaining installations of CouchDB and delete those directories.
remove the existing services using the SC command.
reinstall using the installer into C:\CouchDB (note: no spaces!). Select the option to install as a service (even though this doesn't quite work).
run the command to manually create the service. Note that I'm not using the %COUCH% variable as it doesn't seem to exist on my system at this point:
erlsrv.exe add "CouchDB" -workdir "C:\CouchDB\bin" -onfail restart_always -args "-sasl errlog_type error -s couch +A 4 +W w" -comment "CouchDB 1.6.1"
This command finally managed to properly create a windows service for CouchDB that started correctly. Browsing to http://localhost:5984/_utils/ now brings me to the Futon UI. And relax!

'vagrant ssh' not working with the vagrant-multi-putty plugin

I am trying to run VirtualBox with Vagrant and the plugin vagrant-multi-putty. I am running Windows 10 and am following this guide. All the plugins and steps seem to work fine until I get to the “vagrant ssh” step. I get this error:
I did some googling and the recommended solution is usually to set the path correctly to putty.exe. You can do that like so:
set PATH=%PATH%;C:\Program Files (x86)\PuTTY
Even though the plugin seems to be installing right I can’t find the putty.exe file anywhere on my system. I tried downloading the binaries from here and manually adding them to C:\Program Files (x86)\PuTTY. Then I set the path like the example above. However, I am still getting the same error when I run "vagrant ssh".
Made the same misstake myself at first.
According to the installation instructions for https://github.com/nickryand/vagrant-multi-putty you are supposed to use:
vagrant putty
instead of "vagrant ssh"

Resources