powershell-command-executor-ui icon indicating copy to clipboard operation
powershell-command-executor-ui copied to clipboard

cannot setup correctly : TypeError: Class constructor Pool cannot be invoked without 'new'

Open rebrec opened this issue 9 years ago • 4 comments

Hello, I am experiencing the following error message when trying to do a node ./bin/www

D:\TMP\dev\js\powershell-command-executor-ui\node_modules\stateful-process-command-proxy\statefulProcessCommandProxy.js:128
    this._pool = poolModule.Pool({
                            ^

TypeError: Class constructor Pool cannot be invoked without 'new'
    at new StatefulProcessCommandProxy (D:\TMP\dev\js\powershell-command-executor-ui\node_modules\stateful-process-command-proxy\statefulProcessCommandProxy.js:128:29)
    at Object.<anonymous> (D:\TMP\dev\js\powershell-command-executor-ui\routes\index.js:13:35)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (D:\TMP\dev\js\powershell-command-executor-ui\app.js:8:14)

Process finished with exit code 1

I manage to run properly example.js inside powershell-command-executor module But through the powershell-command-executor-ui module, i always get this error...

Any idea ?

Sincerly (btw Great project !)

rebrec avatar Nov 09 '16 15:11 rebrec

Yeah, looks like the npm module is pulling generic-pool latest and the syntax had some changes

I don't have time to look immediately but should be simple to fix, might you be able to submit a fixing PR for stateful-process-command-proxy? @rebrec

https://gist.github.com/sandfox/5ca20648b60a0cb959638c0cd6fcd02d

bitsofinfo avatar Nov 10 '16 16:11 bitsofinfo

For now i have made some ugly fix to work on what i needed to do (AD User Management). As soon as i have some time i will try to fix it. Thanks again for this great project you provided

rebrec avatar Nov 10 '16 16:11 rebrec

Forget it I just released: https://www.npmjs.com/package/stateful-process-command-proxy

stateful-process-command-proxy 1.0.1 which should fix it, let me know, forces generic-pool 2.4.4 instead of 3.x which is likely what brokeit

Wipe all your node_modules and re npm install

bitsofinfo avatar Nov 10 '16 16:11 bitsofinfo

@rebrec did that fix it?

bitsofinfo avatar Nov 10 '16 17:11 bitsofinfo