-
Notifications
You must be signed in to change notification settings - Fork 70
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
TypeError: shell is not a constructor #144
Comments
I'm also experiencing this issue, and the fixes previously mentioned (in this thread and in issue #16 ) are not working for me. Has anyone else found a solution? |
For me I just had to go back to an old version and it just works in that way.
From: ZTechGuy ***@***.***>
Sent: Tuesday, July 19, 2022 8:16 AM
To: rannn505/child-shell ***@***.***>
Cc: jonkindheaven ***@***.***>; Author ***@***.***>
Subject: Re: [rannn505/child-shell] TypeError: shell is not a constructor (Issue #144)
I'm also experiencing this issue, and the fixes previously mentioned (in this thread and in issue #16 <#16> ) are not working for me. Has anyone else found a solution?
—
Reply to this email directly, view it on GitHub <#144 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AKE5C6EUMN5SV3SB4QO4TMDVU2L6FANCNFSM5IULHEMA> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/AKE5C6CYU4YEPGYBMTM37E3VU2L6FA5CNFSM5IULHEMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOI3PF6YI.gif> Message ID: ***@***.*** ***@***.***> >
|
@jonkindheaven what version you went back to? |
I
Me too. const ps = new Shell({ |
Just as a bump on this issue... I was running ~5.0.1 and getting the same error as everyone above. I downgraded like @msdiniz suggested and that fixed my error. I'm guessing there is something that was changed in versions over 4.0.0. 🤷🏼♂️ |
Hi,
I have been trying to use node-powershell and I constantly get this error
"TypeError: shell is not a constructor"
I have installed it on multiple machines, different folders, etc and it all brings back the same error message
here is the sample code I'm using to test
var shell = require('node-powershell'); var ps = new shell({executionPolicy: 'Bypass', debugMsg: true, noProfile: true}); ps.addCommand('echo "node-powershell rocks"') .then(function(){ return ps.invoke(); }) .then(function(output){ console.log(output); ps.dispose(); }) .catch(function(err){ console.log(err); ps.dispose(); });
The text was updated successfully, but these errors were encountered: