New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on macOS #21

Closed
felixfbecker opened this Issue Sep 29, 2017 · 7 comments

Comments

Projects
None yet
2 participants
@felixfbecker
Collaborator

felixfbecker commented Sep 29, 2017

I'm trying to use this on macOS, getting the following error:

> Install-NodeVersion latest
--2017-09-29 01:54:04--  https://nodejs.org/dist/latest/
Resolving nodejs.org... 104.20.23.46, 104.20.22.46, 2400:cb00:2048:1::6814:172e, ...
Connecting to nodejs.org|104.20.23.46|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘index.html’

index.html                                              [ <=>                                                                                                              ]   4.96K  --.-KB/s    in 0.003s

2017-09-29 01:54:04 (1.66 MB/s) - ‘index.html’ saved [5083]

Install-NodeVersion : The property 'content' cannot be found on this object. Verify that the property exists.
At line:1 char:1
+ Install-NodeVersion latest
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-NodeVersion], PropertyNotFoundException
    + FullyQualifiedErrorId : PropertyNotFoundStrict,Install-NodeVersion

is macOS supported?

@aaronpowell

This comment has been minimized.

Show comment
Hide comment
@aaronpowell

aaronpowell Sep 29, 2017

Owner

Admittedly I've never tried it on anything other than Windows. I don't have a mac available to test on, but let me crack out Docker and try a Linux version, there's probably chance of a similar problem.

How did you install it, from PowerShell Gallery or by cloning the repo?

Owner

aaronpowell commented Sep 29, 2017

Admittedly I've never tried it on anything other than Windows. I don't have a mac available to test on, but let me crack out Docker and try a Linux version, there's probably chance of a similar problem.

How did you install it, from PowerShell Gallery or by cloning the repo?

@aaronpowell

This comment has been minimized.

Show comment
Hide comment
@aaronpowell

aaronpowell Sep 29, 2017

Owner

Just had a quick plan with it in a Docker container and it'll probably be a lot more of a challenge than initially thought.

So the problem that you're reporting above is caused by this line where I use the wget alias for Invoke-WebRequest on Windows. Now that's a fairly easy problem to solve, but it then cascades into the next problem: https://github.com/aaronpowell/ps-nvmw/blob/master/nvm.psm1#L196

The function will download a MSI, which it then will unpack, which a) isn't possible msiexec.exe isn't available and b) the unpacked files wouldn't be of any use, they are Windows binaries 😛. I guess I could probably make it check the OS type (although I'm not sure how to do it in an xplat manner) and then download/unpack the right type as needed.

Owner

aaronpowell commented Sep 29, 2017

Just had a quick plan with it in a Docker container and it'll probably be a lot more of a challenge than initially thought.

So the problem that you're reporting above is caused by this line where I use the wget alias for Invoke-WebRequest on Windows. Now that's a fairly easy problem to solve, but it then cascades into the next problem: https://github.com/aaronpowell/ps-nvmw/blob/master/nvm.psm1#L196

The function will download a MSI, which it then will unpack, which a) isn't possible msiexec.exe isn't available and b) the unpacked files wouldn't be of any use, they are Windows binaries 😛. I guess I could probably make it check the OS type (although I'm not sure how to do it in an xplat manner) and then download/unpack the right type as needed.

@felixfbecker

This comment has been minimized.

Show comment
Hide comment
@felixfbecker

felixfbecker Sep 29, 2017

Collaborator

I installed it with homebrew, but any PowerShell Code version should reproduce the issue. You probably should be able to just run PowerShell in WSL to reproduce it.

It would be fantastic if this version manager worked for any OS. The downloading/installation logic can probably be largely copied from how nvm does it.

Here's my version info if it helps:

>  $PSVersionTable                                                                                                      

Name                           Value                                                                                   
----                           -----                                                                                   
PSVersion                      6.0.0-beta                                                                              
PSEdition                      Core                                                                                    
GitCommitId                    v6.0.0-beta.7                                                                           
OS                             Darwin 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-37...
Platform                       Unix                                                                                    
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                 
PSRemotingProtocolVersion      2.3                                                                                     
SerializationVersion           1.1.0.1                                                                                 
WSManStackVersion              3.0     
Collaborator

felixfbecker commented Sep 29, 2017

I installed it with homebrew, but any PowerShell Code version should reproduce the issue. You probably should be able to just run PowerShell in WSL to reproduce it.

It would be fantastic if this version manager worked for any OS. The downloading/installation logic can probably be largely copied from how nvm does it.

Here's my version info if it helps:

>  $PSVersionTable                                                                                                      

Name                           Value                                                                                   
----                           -----                                                                                   
PSVersion                      6.0.0-beta                                                                              
PSEdition                      Core                                                                                    
GitCommitId                    v6.0.0-beta.7                                                                           
OS                             Darwin 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-37...
Platform                       Unix                                                                                    
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                 
PSRemotingProtocolVersion      2.3                                                                                     
SerializationVersion           1.1.0.1                                                                                 
WSManStackVersion              3.0     
@aaronpowell

This comment has been minimized.

Show comment
Hide comment
@aaronpowell

aaronpowell Sep 29, 2017

Owner

*facemap

Of course $PSVersionTable can tell me the OS in use! I might have a bit of a look into it, but I will need help doing the OSX testing as I don't have a device running that.

Owner

aaronpowell commented Sep 29, 2017

*facemap

Of course $PSVersionTable can tell me the OS in use! I might have a bit of a look into it, but I will need help doing the OSX testing as I don't have a device running that.

@felixfbecker

This comment has been minimized.

Show comment
Hide comment
@felixfbecker

felixfbecker Sep 29, 2017

Collaborator

Happy to test out any changes!

Collaborator

felixfbecker commented Sep 29, 2017

Happy to test out any changes!

@felixfbecker

This comment has been minimized.

Show comment
Hide comment
@felixfbecker

felixfbecker Oct 3, 2017

Collaborator

Anything I can help out with? Any pointers?

Collaborator

felixfbecker commented Oct 3, 2017

Anything I can help out with? Any pointers?

@aaronpowell

This comment has been minimized.

Show comment
Hide comment
Owner

aaronpowell commented Nov 2, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment