I wanted to install Cypress using npm - but my corporate firewall is blocking.
So I tried the below method in my Terminal in Visual Studio Code - But getting an error (pasted below)
Any idea on why this script does not work? and solution to it?
PS C:\Users\c64881a\Desktop\NPM_Cypress> CYPRESS_INSTALL_BINARY=C:/Users/c64881a/Downloads/cypress.zip npm install cypress
CYPRESS_INSTALL_BINARY=C:/Users/c64881a/Downloads/cypress.zip : The term 'CYPRESS_INSTALL_BINARY=C:/Users/c64881a/Downloads/cypress.zip' is not recognized as
the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct
and try again.
At line:1 char:1
CYPRESS_INSTALL_BINARY=C:/Users/c64881a/Downloads/cypress.zip npm ins ...
+ CategoryInfo : ObjectNotFound: (CYPRESS_INSTALL...ads/cypress.zip:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Please, try this in PowerShell:
setx CYPRESS_INSTALL_BINARY C:/Users/c64881a/Downloads/cypress.zip
Related
I have downloaded anaconda and have also successfully downloaded gensim.
I am trying to run gensim but not making much progress. I am running jupyter.
When I try the following command in jupyter:
from gensim.models.doc2vec import Doc2Vec
I get the following:
At line:1 char:1
+ from gensim.models.doc2vec import Doc2Vec
+ ~~~~
The 'from' keyword is not supported in this version of the language.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : ReservedKeywordNotAllowed
What am I missing?
Installing the kubectl on windows 10 not working. I follow this URL.
I tried different install options, in the powershell and using chocolote. None of them worked for me. The error is clear that this execuable is not supported for windows os. I did checked the SHA but it is different.
PS D:\chocoloate_tmpdir> curl -o kubectl.exe.sha256 https://amazon-eks.s3-us-west-2.amazonaws.com/1.14.6/2019-08-22/bin/windows/amd64/kubectl.exe.sha256
PS D:\chocoloate_tmpdir> Get-FileHash kubectl.exe
Algorithm Hash Path
--------- ---- ----
SHA256 02F984988E490046CBC831A582D34505C28C7DD9AB61C357E264C7178596B701 D:\chocoloate_tmpdir\kubectl.exe
PS D:\chocoloate_tmpdir> Get-FileHash .\kubectl.exe.sha256
Algorithm Hash Path
--------- ---- ----
SHA256 98BCEB6AF839704828C28709B60628E25CF5F624A6D6E7D06F1FC255AA4254CB D:\chocoloate_tmpdir\kubectl.exe.sha256
question is, what could be the issue and what other methods are available for installing kubectl in windows.
Here are the commands tried and error output:
one:
PS D:\chocoloate_tmpdir> choco install kubernetes-cli Chocolatey v0.10.15
Installing the following packages:
kubernetes-cli
By installing you accept licenses for the packages.
Progress: Downloading kubernetes-cli 1.17.1... 100%
kubernetes-cli v1.17.1 [Approved]
kubernetes-cli package files install completed. Performing other installation steps.
The package kubernetes-cli wants to run 'chocolateyInstall.ps1'.
Note: If you don't run this script, the installation will fail.
Note: To confirm automatically next time, use '-y' or consider:
choco feature enable -n allowGlobalConfirmation
Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): Y
Extracting 64-bit C:\ProgramData\chocolatey\lib\kubernetes-cli\tools\kubernetes-client-windows-amd64.tar.gz to C:\ProgramData\chocolatey\lib\kubernetes-cli\tools...
C:\ProgramData\chocolatey\lib\kubernetes-cli\tools
Extracting 64-bit C:\ProgramData\chocolatey\lib\kubernetes-cli\tools\kubernetes-client-windows-amd64.tar to C:\ProgramData\chocolatey\lib\kubernetes-cli\tools...
C:\ProgramData\chocolatey\lib\kubernetes-cli\tools
ShimGen has successfully created a shim for kubectl.exe
The install of kubernetes-cli was successful.
Software installed to 'C:\ProgramData\chocolatey\lib\kubernetes-cli\tools'
Chocolatey installed 1/1 packages.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
PS D:\chocoloate_tmpdir> kubectl version --client Program 'kubectl.exe' failed to run: The specified executable is not a valid application for this OS platform.At line:1 char:1
+ kubectl version --client
+ ~~~~~~~~~~~~~~~~~~~~~~~~.
At line:1 char:1
+ kubectl version --client
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
+ FullyQualifiedErrorId : NativeCommandFailed
two:
PS D:\chocoloate_tmpdir> curl -o kubectl.exe https://amazon-eks.s3-us-west-2.amazonaws.com/1.14.6/2019-08-22/bin/windows/amd64/kubectl.exe
PS D:\chocoloate_tmpdir> cp .\kubectl.exe C:\bin\
PS D:\chocoloate_tmpdir> kubectl version Program 'kubectl.exe' failed to run: The specified executable is not a valid application for this OS platform.At line:1 char:1
+ kubectl version
+ ~~~~~~~~~~~~~~~.
At line:1 char:1
+ kubectl version
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
+ FullyQualifiedErrorId : NativeCommandFailed
You've probably missed some of these steps:
Copy the binary to a folder in your PATH. If you have an existing
directory in your PATH that you use for command line utilities, copy
the binary to that directory. Otherwise, complete the following steps.
Create a new directory for your command line binaries, such as C:\bin.
Copy the kubectl.exe binary to your new directory.
Edit your user or system PATH environment variable to add the new directory to your PATH.
Close your PowerShell terminal and open a new one to pick up the new PATH variable.
Please verify what is the current content of your PATH. You can move your kubectl binary directly to one of those folders which are already added to your PATH. Alternatively you may edit it and add your desired directory containing kubectl. Have you relaunched your PowerShell terminal after saving the changes ? It's quite straightforward to configure and there is no need to use full paths to the executable.
Take a look at this article in the official kubernetes docs.
Please let me know if it helps.
Calling the command from the current path does the trick. I have added the executable to c:\bin path and added the path to system environment variable, somehow it was not set, not sure why. Its an issue with the execuable being not found in the path.
PS D:\chocoloate_tmpdir> kubectl version Program 'kubectl.exe' failed to run: The specified executable is not a valid application for this OS platform.At line:1 char:1
+ kubectl version
+ ~~~~~~~~~~~~~~~.
At line:1 char:1
+ kubectl version
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
+ FullyQualifiedErrorId : NativeCommandFailed
PS D:\chocoloate_tmpdir> .\kubectl.exe version Client Version: version.Info{Major:"1", Minor:"14+", GitVersion:"v1.14.7-eks-1861c5", GitCommit:"1861c597586f84f1498a9f2151c78d8a6bf47814", GitTreeState:"clean", BuildDate:"2019-09-24T22:12:08Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"windows/amd64"}
Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.
I recently installed Oracle jet and I haven't made any changes to it. I created my first project today and it's showing error when I try to build it or serve it. I am trying to run it on Visual Studio (I don't this matters tho)
This is the error I am getting
PM> ojet serve ojet : [31mError: Your JET project does not have oraclejet-tooling installed.[0m
At line:1 char:
+ ojet serve
+ ~~~~~~~~~~
+ CategoryInfo : NotSpecified: ([31mError: You... installed.[0m:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
UPDATE: Apparently when I create a new template it is creating an error from there itself the app structure is generated but during invoking mom install it is unable to parse through some certain JSON
Following is the Error:
ojet create ojetnavbar --template=navbar
Processing template: navbar
Your app structure is generated. Continuing with library install.
Performing npm install may take a bit.
Invoking npm install.
npm WARN deprecated coffee-script#1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm ERR! Unexpected end of JSON input while parsing near '...oIzTWjIvO8rspcLCK+1pI'
npm ERR! A complete log of this run can be found in:
npm ERR! *location of log*
Error: (during Invoking npm install.) 1
$ npm install -g #oracle/ojet-cli
$ npm install -g #oracle/oraclejet-tooling
$ ojet restore
This will solve your problem
I have sorted out on the issue it was because the JSON npm was trying to parse were mostly cached and due to that a parsing error was occurring
I used npm-cache clean on my PC and all of it ran after that perfectly fine.
I think you need to add oraclejet tooling to your project. Try this:
cd appDir
npm install #oracle/oraclejet-tooling --save
oraclejet-tooling package has been deprecated, you have to use module contains a command-line interface for Oracle JET web and hybrid mobile application development.
See https://www.npmjs.com/package/#oracle/ojet-cli
cd oracle-jet-simple-web
npm install #oracle/ojet-cli --save
For me this helped
npm i #oracle/oraclejet-tooling
Here is the link: npmjs.com/package/#oracle/oraclejet-tooling
I am trying to install Chocolatey
https://chocolatey.org/install
and using the command:
#"%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"
It is showing error:
Unable to unzip package using 7zip. Perhaps try setting $env:chocolateyUseWindowsCompression = 'true' and call install
again. Error: 7-Zip encountered a fatal error while extracting the files
At line:221 char:9
+ 2 { throw "$errorMessage 7-Zip encountered a fatal error while ex ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Unable to unzip...cting the files:String) [], RuntimeException
+ FullyQualifiedErrorId : Unable to unzip package using 7zip. Perhaps try setting $env:chocolateyUseWindowsCompres
sion = 'true' and call install again. Error: 7-Zip encountered a fatal error while extracting the files
I have 7zip installed.
I encounter the same issue.
Running window cmd as administrator may be a solution for some but in my case i had to update my window system environment variable,
I just added this to exiting value on
path: $env:chocolateyUseWindowsCompression = 'true'
and all works just fine.
I had the same error when I was trying to install chocolatey on multiple servers which was finally getting blocked at chocolatey server, which is a chocolatey feature.
https://chocolatey.org/docs/community-packages-disclaimer#rate-limiting
Hence the downloaded file is null and cannot be unzipped. The block is lifted an hour later. After rate limit is lifted, the errors disappears until you trigger it again.
Rate limiting also applies to other packages. When limit is hit while downloading a package other than chocolatey itself, you will get an error code 429.
https://chocolatey.org/docs/troubleshooting#im-getting-a-429-too-many-requests-issue-when-attempting-to-use-the-community-package-repository
First answer: Running window cmd as administrator may be a solution for some but in my case i had to update my window system environment variable, I just added this to exiting value on path: $env:chocolateyUseWindowsCompression = 'true' and all works just fine.
may not work immediately and you still receive "Unable to unzip package using 7zip." error.
Try again after restarting your machine. In my case command works after restarting.
Thx
karam
After a few months, i ran the same command from cmd with Administrative Privilege and it worked. The main point was running
cmd.exe As an Administrator.
I'm having an issue with PowerShell. It's almost like it's not installed all the way; which is weird since it's Windows 10 and it ships with it.
With no lock, I've tried replacing the following directories with a fresh copy from another Windows 10 machine that is working:
C:\Users\UserName\AppData\Local\PackageManagement
C:\Program Files\WindowsPowerShell
C:\Program Files (x86)\WindowsPowerShell
C:\Windows\System32\WindowsPowerShell
I also tried SFC /scannow, but it found no issues. I've searched for hours and haven't been able to find anyone with the exact same issue. Does anyone have any ideas?
System Information:
PS C:\WINDOWS\system32> [environment]::OSVersion.Version
Major Minor Build Revision
----- ----- ----- --------
10 0 10586 0
PS C:\WINDOWS\system32> $PSVersionTable.PSVersion
Major Minor Build Revision
----- ----- ----- --------
5 0 10586 122
Errors:
PS C:\WINDOWS\system32> Get-PSRepository
PackageManagement\Get-PackageSource : Unable to find module providers (PowerShellGet).
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:3544 char:31
+ ... ckageSources = PackageManagement\Get-PackageSource #PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument:(Microsoft.Power...etPackageSource:GetPackageSource) [Get-PackageSource
], Exception
+ FullyQualifiedErrorId : UnknownProviders,Microsoft.PowerShell.PackageManagement.Cmdlets.GetPackageSource
PS C:\WINDOWS\system32> Get-PackageProvider -Name PSModule -ForceBootstrap
Get-PackageProvider : Unable to find package provider 'PSModule'. It may not be imported yet. Try 'Get-PackageProvider
-ListAvailable'.
At line:1 char:1
+ Get-PackageProvider -Name PSModule -ForceBootstrap
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Microsoft.Power...PackageProvider:GetPackageProvider) [Get-PackageProvi
der], Exception
+ FullyQualifiedErrorId : UnknownProviderFromActivatedList,Microsoft.PowerShell.PackageManagement.Cmdlets.GetPacka
geProvider
The below returns nothing:
PS C:\WINDOWS\system32> Get-PackageProvider -ListAvailable
PS C:\WINDOWS\system32>
If your end goal is to install packages from Chocolatey or something similar with PowerShell you would want to perform the following.
To import the Module you would execute the following:
Import-Module PackageManagement
To install the package providers you would execute the following:
Install-PackageProvider -Name Chocolatey -Force
To find a package within the package provider Chocolatey you would execute the following (you could use wildcard for name to get all packages available):
Find-Package -Name SomePackageNameHere -ProviderName Chocolatey
Lastly, to install a package from Chocolatey you would execute the following:
Install-Package -Name SomePackageNameHere -ProviderName Chocolatey -Force
I hope this helps!
Looks like I solved the issue. I installed Chocolatey by using the CMD.exe method.
I ran CMD.exe as an administrator and ran the following command:
#powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
Now I have a PS Repository:
PS C:\WINDOWS\system32> Get-PSRepository
Name PackageManagementProvider InstallationPolicy SourceLocation
---- ------------------------- ------------------ --------------
PSGallery NuGet Untrusted https://www.powershellgallery.com/api/v2/
I'm guessing something during the install of Chocolatey, repaired whatever was broken.