Skip to content
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

Getting ERR_OUT_OF_RANGE error on any js file #26

Closed
ilearnio opened this issue May 3, 2018 · 12 comments
Closed

Getting ERR_OUT_OF_RANGE error on any js file #26

ilearnio opened this issue May 3, 2018 · 12 comments

Comments

@ilearnio
Copy link

ilearnio commented May 3, 2018

It's just not working for me on Ubuntu (14.04.3 LTS). I'm getting this error when trying to run/build string.js that is generated by nectar --example

$ nectar string.js
internal/buffer.js:35
    throw new ERR_OUT_OF_RANGE('value', `>= ${min} and <= ${max}`, value);
    ^

RangeError [ERR_OUT_OF_RANGE]: The value of "value" is out of range. It must be >= -2147483648 and <= 2147483647. Received 3653141014
    at checkInt (internal/buffer.js:35:11)
    at writeU_Int32LE (internal/buffer.js:515:3)
    at Buffer.writeInt32LE (internal/buffer.js:684:10)
    at Object.entryHeaderToBinary (/usr/local/lib/node_modules/nectarjs/extern/adm-zip/headers/entryHeader.js:216:18)
    at Object.packHeader (/usr/local/lib/node_modules/nectarjs/extern/adm-zip/zipEntry.js:260:39)
    at /usr/local/lib/node_modules/nectarjs/extern/adm-zip/zipFile.js:198:41
    at Array.forEach (<anonymous>)
    at Object.compressToBuffer (/usr/local/lib/node_modules/nectarjs/extern/adm-zip/zipFile.js:182:23)
    at Object.toBuffer (/usr/local/lib/node_modules/nectarjs/extern/adm-zip/adm-zip.js:488:25)
    at /usr/local/lib/node_modules/nectarjs/nectar.js:488:45
@adrien-thierry
Copy link
Contributor

Do you generate examples in a new folder ?
mkdir example && cd example && nectar --example

Else, it will upload all your current directory

@adrien-thierry
Copy link
Contributor

This problem comes from adm-zip,

@sfcgeorge
Copy link

Have exactly the same issue.

First I did what you suggested, new folder:

mkdir example && cd example && nectar --example

But same issue as above:

internal/buffer.js:35
    throw new ERR_OUT_OF_RANGE('value', `>= ${min} and <= ${max}`, value);
    ^

RangeError [ERR_OUT_OF_RANGE]: The value of "value" is out of range. It must be >= -2147483648 and <= 2147483647. Received 3578355303
    at checkInt (internal/buffer.js:35:11)
    at writeU_Int32LE (internal/buffer.js:515:3)
    at Buffer.writeInt32LE (internal/buffer.js:684:10)
    at Object.entryHeaderToBinary (/usr/local/lib/node_modules/nectarjs/extern/adm-zip/headers/entryHeader.js:216:18)
    at Object.packHeader (/usr/local/lib/node_modules/nectarjs/extern/adm-zip/zipEntry.js:260:39)
    at /usr/local/lib/node_modules/nectarjs/extern/adm-zip/zipFile.js:198:41
    at Array.forEach (<anonymous>)
    at Object.compressToBuffer (/usr/local/lib/node_modules/nectarjs/extern/adm-zip/zipFile.js:182:23)
    at Object.toBuffer (/usr/local/lib/node_modules/nectarjs/extern/adm-zip/adm-zip.js:488:25)
    at /usr/local/lib/node_modules/nectarjs/nectar.js:505:45

On macOS.

@adrien-thierry
Copy link
Contributor

sfcgeorge : on which OS are you testing NectarJS ?

What is your NodeJS version ?

@sfcgeorge
Copy link

Mac OS X 10.13
Node v10.5.0

@adrien-thierry
Copy link
Contributor

adrien-thierry commented Sep 15, 2018

Are you getting this error with the following exact steps :

mkdir example && cd example && nectar --example
nectar args.js --env node

@sfcgeorge
Copy link

Just tried again with those exact steps, yes same error.

@sfcgeorge
Copy link

I tried with the --single flag and then I get this error instead:

[!] Unexpected network error

@adrien-thierry
Copy link
Contributor

Are you behind a proxy ?

Tested now : nectar --target mac-osx string.js --single

it works for me, just a bug with node env and libuv for mac-osx, working on it

@adrien-thierry
Copy link
Contributor

Libuv (--env node) works now

@sfcgeorge
Copy link

The simple examples do work now, thanks. On longer code I still get [!] Unexpected network error but I'll open a separate issue.

@adrien-thierry
Copy link
Contributor

Bug fixed with update of adm-zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants