nodal
nodal copied to clipboard
error on poly:deploy
I tried to deploy my Nodal API on polybit, but got this error on deploy (using nodal v0.12.2):
λ nodal poly:deploy refab
Compiling...
C:\Users\SylvainLap\AppData\Roaming\npm\node_modules\nodal\cli\commands\poly\deploy.js:80
return cb(err, {filename: filename, data: result.toString('base64')});
^
TypeError: Cannot read property 'toString' of undefined
at ReadFileContext.callback (C:\Users\SylvainLap\AppData\Roaming\npm\node_modules\nodal\cli\commands\poly\deploy.js:80:61)
at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:303:13)
I'll need to test this out on Windows myself. If you have a chance to play with the source code and find the error, let me know, might take me a day or two to get to.
I played with the source code, and the error comes from an EMFILE error: too many open files.
{ [Error: EMFILE: too many open files, open 'D:\DEV\WORKSPACE\refab\node_modules\nodal\node_modules\inquirer\node_modules\string-width\node_modules\is-fullwidth-code-point\node_modules\number-is-nan\license']
errno: -4066,
code: 'EMFILE',
syscall: 'open',
path: 'D:\\DEV\\WORKSPACE\\refab\\node_modules\\nodal\\node_modules\\inquirer\\node_modules\\string-width\\node_modules\\is-fullwidth-code-point\\node_modules\\number-is-nan\\license' }
Because of this error, result is undefined, and the result.toString('base64') fails.
Hm. I'll do some deeper diving soon. Maybe just create a queue and limit the number of files open at once.
Also encountering this very same issue. Poly looks pretty cool, so I'm anxious to give it a try!
Alright everyone, been a bit busy but will spin up a VM this week and play on Windows to fix this for you. :) Sorry for the delay!