nodal icon indicating copy to clipboard operation
nodal copied to clipboard

error on poly:deploy

Open sylvainlap opened this issue 9 years ago • 5 comments

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)

sylvainlap avatar Jul 06 '16 08:07 sylvainlap

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.

keithwhor avatar Jul 06 '16 16:07 keithwhor

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.

sylvainlap avatar Jul 07 '16 08:07 sylvainlap

Hm. I'll do some deeper diving soon. Maybe just create a queue and limit the number of files open at once.

keithwhor avatar Jul 12 '16 07:07 keithwhor

Also encountering this very same issue. Poly looks pretty cool, so I'm anxious to give it a try!

DigitalMachinist avatar Jul 15 '16 14:07 DigitalMachinist

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!

keithwhor avatar Jul 18 '16 07:07 keithwhor