-
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 #16
Comments
Hey @forensicsguy20012004 , const shell = require('node-powershell'); Let me know if you managed to solved this, or you need further help. |
Hello...thanks for replying back so quickly :) So I ran the following code.... var shell = require('node-powershell'); I installed via NPM doing: npm install node-powershell --save I have not been able to get this working...yet...I am hoping I will or I will find something. I am running v6.9.1 on a Windows 7 box. |
Info: Start process (6:42:23 PM) TypeError: shell is not a constructor Info: End process (6:42:24 PM) I have run this a couple different ways...so I am not getting an error about the module not being loaded or available. I will try anything. |
Hey @forensicsguy20012004 , |
Sorry for responding back so late...I will give that a try and look forward to a new push of your module. Keep up the good work :) |
So, I pulled down your newest version via NPM: "node-powershell": "3.0.1"...still getting the same error. My guess is, it has got to be something that I am doing. I am pretty adept as Node but for some reason this escapes me.
|
Hey @forensicsguy20012004 |
Hello @rannn505, I have the same problem as @forensicsguy20012004. This is the code I was trying to run: const Shell = require('node-powershell');
const ps = new Shell({
executionPolicy: 'Bypass',
noProfile: true
});
ps.addCommand('echo node-powershell');
ps.invoke()
.then(output => {
console.log(output);
})
.catch(err => {
console.log(err);
}); I copied this code from StackOverflow and wanted to test it, but I don't know how to workaround this error. |
I am running the following: var ps = new shell({executionPolicy: 'Bypass', debugMsg: true, noProfile: true});
and received the following error: [TypeError: shell is not a constructor]
any thoughts
The text was updated successfully, but these errors were encountered: