How do I install yarn global live-server - yarnpkg

I'm trying to install yarn global live server.
yarn : File C:\Program Files\nodejs\yarn.ps1 cannot be loaded because running scripts is disabled on this system. For
more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ yarn global add live-server
+ ~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess

Related

Unable to import powershell module remotley

I'm importing module remotely. module located in C:\Users\Ananth\Documents\WindowsPowerShell\Modules\MSOnline\. I am able to view the module remotely. while importing getting below error. if try to execute in powershell application module importing successfully in both bit versions.
Import-Module : Could not load file or assembly 'file:///C:\Users\CAC-Dev\Documents\WindowsPowerShell\Modules\MSOnline\
1.1.183.66\Microsoft.Online.Administration.Automation.PSModule.dll' or one of its dependencies. An attempt was made to
load a program with an incorrect format.
At line:1 char:1
+ Import-Module MSOnline
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Import-Module], BadImageFormatException
+ FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand
Could not load file or assembly 'file:///C:\Users\CAC-Dev\Documents\WindowsPowerShell\Modules\MSOnline\
1.1.183.66\Microsoft.Online.Administration.Automation.PSModule.dll'

How can I solve a browserextension.dll error I keep getting when I load windows

I've been getting this error and I haven't been able to figure out how to solve it. I can't find any online info on this. I had Malwarebyte installed, and I think it quarantined some files that I might have deleted without realizing it.
This error loads each time I start up my PC.
Barring having to reinstall windows does anyone have any idea how to correct this error? I can't recall what software may have installed this. THanks.
Exception calling "ReadAllBytes" with "1" argument(s): "Could not find a part of the path
'C:\Users\janly\AppData\Roaming\Browser Extension\BrowserExtension.dll'."
At line:1 char:39
... Extension/';[Reflection.Assembly]::Load([System.IO.File]::ReadAllByte ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CategoryInfo : NotSpecified: (:) [], MethodInvocationException
FullyQualifiedErrorId : DirectoryNotFoundException
Unable to find type [WebCompanion.BrowserExtension.S].
At line:1 char:126
... $w+'BrowserExtension.dll'));[WebCompanion.BrowserExtension.S]::Start( ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CategoryInfo : InvalidOperation: (WebCompanion.BrowserExtension.S:TypeName) [], RuntimeException
FullyQualifiedErrorId : TypeNotFound
[process exited with code 1 (0x00000001)]

How to fix error while using sanity init coupon?

I want to build a new project using sanity. I tried this command - npm install -g #sanity/cli and it was successfully installed. But when I tried this command - sanity init --coupon javascriptmastery2022, I get the following error:
sanity : File C:\Users\asus\AppData\Roaming\npm\sanity.ps1 cannot be loaded because running scripts is disabled on this system. For more
information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ sanity init --coupon javascriptmastery2022
+ ~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
Now how should I fix this error?
Start powershell as administrator and go to the folder where you want to install sanity.
Type: Set-ExecutionPolicy -Scope CurrentUser
Then change to Unrestricted
It should work now
Run this command in bash in the backend Sanity folder

Cannot install Chocolatey on Windows 10 version 1903

I recently upgraded my Windows 10 to version 1903, but after some issue and contacting Microsoft technical support, I've reset my Windows. Now I'm trying to reinstall everything that was installed before reset and one of them is Chocolatey (The package manager for Windows).
I tried running both installation command:
(for cmd)
#"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
(for PowerShell)
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
but every time I get this error:
Exception calling "Start" with "0" argument(s): "The specified executable is not a valid application for this OS
platform."
At C:\Users\ehsan\Downloads\install.ps1:206 char:3
+ $process.Start() | Out-Null
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : Win32Exception
Exception calling "BeginOutputReadLine" with "0" argument(s): "StandardOut has not been redirected or the process
hasn't started yet."
At C:\Users\ehsan\Downloads\install.ps1:207 char:3
+ $process.BeginOutputReadLine()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : InvalidOperationException
Exception calling "WaitForExit" with "0" argument(s): "No process is associated with this object."
At C:\Users\ehsan\Downloads\install.ps1:208 char:3
+ $process.WaitForExit()
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : InvalidOperationException
Unable to unzip package using 7zip. Perhaps try setting $env:chocolateyUseWindowsCompression = 'true' and call install
again. Error: 7-Zip signalled an unknown error (code )
At C:\Users\ehsan\Downloads\install.ps1:220 char:15
+ ... default { throw "$errorMessage 7-Zip signalled an unknown error (co ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Unable to unzip...n error (code ):String) [], RuntimeException
+ FullyQualifiedErrorId : Unable to unzip package using 7zip. Perhaps try setting $env:chocolateyUseWindowsCompres
sion = 'true' and call install again. Error: 7-Zip signalled an unknown error (code )
I also tried downloading the install.ps1 scripts and running it manually (after setting execution policy to bypass, for sure), but the result was the same as above. Worth mentioning that I ran both cmd and PowerShell as administrator for installation. By the way, I didn't try offline installation yet, because I cannot figure out what the instruction says.
Googling the error didn't help me find a solution.
I had this same problem (at least the message was exactly the same). I was installing chocolatey in a more controlled environment, that is, some parts of the scripts are not allowed to be performed by some security policy reason.
The error is that on line 192 of the PowerShell, it's attempted to download an EXE file:
Download-File 'https://chocolatey.org/7za.exe' "$7zaExe"
This is not allowed in my environment, so as I have the Zip already installed on my Windows, I just copy the and renamed the needed file (7az.exe) to the folder that the install.ps1 (Powershell script) was looking for.
In my case:
C:\Users\%USER%\AppData\Local\Temp\chocolatey\chocInstall\7za.exe
So, having the ZIP exe file at this path, with this name, everything worked.
Cheers

Cassandra installation on Windows 7

I have done the following on Windows 7 for running Cassandra:
Installed Python.
Downloaded a zip of Cassandra from the original site.
While executing cassandra batch getting following messages:
Exception calling "Start" with "0" argument(s): "The system cannot find the file
specified" At E:\apache-cassandra-3.11.2\conf\cassandra-env.ps1:212 char:5
+ $p.Start() | Out-Null
+ ~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : Win32Exception
You may want to check out https://kimola.com/cassandrows. I am in the same situation of wanting to install Cassandra on Windows. But I do not want to be left behind with version 3.9.0.

Resources