Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Uncaught std::invalid_argument: Constructor arguments should be numbers exclusively #1127

Closed
xzyfer opened this issue Sep 8, 2015 · 11 comments

Comments

@xzyfer
Copy link
Contributor

xzyfer commented Sep 8, 2015

Originally mentioned in #1124 (comment)
Error produced running npm test with v3.3.2 on iojs 3.2.0 on Darwin.

      ✓ should always map null, true and false to the same (immutable) object
      should properly bubble up errors from sass color constructor
libc++abi.dylib: terminating with uncaught exception of type std::invalid_argument: Constructor arguments should be numbers exclusively.
[1]    40186 abort      npm test
$ otool -L  /Users/michael/.nvm/versions/io.js/v3.2.0/bin/node
/Users/michael/.nvm/versions/io.js/v3.2.0/bin/node:
    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1153.18.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
    /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 104.1.0)
    /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 283.0.0)

Build log - https://gist.github.com/xzyfer/61d161a8b56ec0f86b8e

@saper
Copy link
Member

saper commented Sep 8, 2015

Which commit are you at?

@xzyfer
Copy link
Contributor Author

xzyfer commented Sep 8, 2015

That log was from the v3.3.2 tag, but is see same issue on master edbf497

@saper saper changed the title Uncaught exception in binding Uncaught std::invalid_argument: Constructor arguments should be numbers exclusively Sep 8, 2015
@saper
Copy link
Member

saper commented Sep 8, 2015

Can you also ldd <your-binding-file> ?

@saper
Copy link
Member

saper commented Sep 8, 2015

And ... also I'd like to have your /Users/michael/Projects/Sass/node-sass/build/config.gypi

@mgol
Copy link
Contributor

mgol commented Sep 8, 2015

I have exactly the same error on OS X 10.11 (public beta 6) with Node.js 4.0.0 final.

My ./build/config.gypi:

# Do not edit. File was generated by pangyp's "configure" step
{
  "target_defaults": {
    "cflags": [],
    "default_configuration": "Release",
    "defines": [],
    "include_dirs": [],
    "libraries": []
  },
  "variables": {
    "asan": 0,
    "host_arch": "x64",
    "icu_data_file": "icudt55l.dat",
    "icu_data_in": "../../deps/icu/source/data/in/icudt55l.dat",
    "icu_endianness": "l",
    "icu_gyp_path": "tools/icu/icu-generic.gyp",
    "icu_locales": "en,root",
    "icu_path": "./deps/icu",
    "icu_small": "true",
    "icu_ver_major": "55",
    "llvm_version": "3.6",
    "node_byteorder": "little",
    "node_install_npm": "true",
    "node_prefix": "/",
    "node_release_urlbase": "https://nodejs.org/download/release/",
    "node_shared_http_parser": "false",
    "node_shared_libuv": "false",
    "node_shared_openssl": "false",
    "node_shared_zlib": "false",
    "node_tag": "",
    "node_use_dtrace": "true",
    "node_use_etw": "false",
    "node_use_lttng": "false",
    "node_use_openssl": "true",
    "node_use_perfctr": "false",
    "openssl_fips": "",
    "openssl_no_asm": 0,
    "python": "/usr/bin/python",
    "target_arch": "x64",
    "uv_parent_path": "/deps/uv/",
    "uv_use_dtrace": "true",
    "v8_enable_gdbjit": 0,
    "v8_enable_i18n_support": 1,
    "v8_no_strict_aliasing": 1,
    "v8_optimized_debug": 0,
    "v8_random_seed": 0,
    "v8_use_snapshot": 1,
    "want_separate_host_toolset": 0,
    "nodedir": "/Users/mgol/.node-gyp/4.0.0",
    "copy_dev_lib": "true",
    "standalone_static_library": 1,
    "libsass_ext": "",
    "libsass_cflags": "",
    "libsass_ldflags": "",
    "libsass_library": "",
    "save_dev": "",
    "viewer": "man",
    "browser": "",
    "rollback": "true",
    "usage": "",
    "globalignorefile": "/Users/mgol/.nvm/versions/node/v4.0.0/etc/npmignore",
    "shell": "/bin/zsh",
    "init_author_url": "",
    "shrinkwrap": "true",
    "parseable": "",
    "init_license": "ISC",
    "email": "m.goleb@gmail.com",
    "if_present": "",
    "sign_git_tag": "",
    "init_author_email": "",
    "cache_max": "Infinity",
    "long": "",
    "local_address": "",
    "git_tag_version": "true",
    "cert": "",
    "registry": "https://registry.npmjs.org/",
    "npat": "",
    "fetch_retries": "2",
    "versions": "",
    "message": "%s",
    "key": "",
    "globalconfig": "/Users/mgol/.nvm/versions/node/v4.0.0/etc/npmrc",
    "always_auth": "",
    "spin": "true",
    "cache_lock_retries": "10",
    "cafile": "",
    "heading": "npm",
    "proprietary_attribs": "true",
    "fetch_retry_mintimeout": "10000",
    "json": "",
    "access": "",
    "https_proxy": "",
    "engine_strict": "",
    "description": "true",
    "userconfig": "/Users/mgol/.npmrc",
    "init_module": "/Users/mgol/.npm-init.js",
    "user": "501",
    "node_version": "4.0.0",
    "save": "",
    "editor": "vi",
    "tag": "latest",
    "global": "",
    "optional": "true",
    "force": "",
    "bin_links": "true",
    "searchopts": "",
    "depth": "Infinity",
    "searchsort": "name",
    "rebuild_bundle": "true",
    "unicode": "true",
    "fetch_retry_maxtimeout": "60000",
    "tag_version_prefix": "v",
    "strict_ssl": "true",
    "save_prefix": "^",
    "ca": "",
    "save_exact": "",
    "group": "20",
    "fetch_retry_factor": "10",
    "dev": "",
    "version": "",
    "cache_lock_stale": "60000",
    "cache_min": "10",
    "searchexclude": "",
    "cache": "/Users/mgol/.npm",
    "color": "true",
    "save_optional": "",
    "ignore_scripts": "",
    "user_agent": "npm/2.14.2 node/v4.0.0 darwin x64",
    "cache_lock_wait": "10000",
    "production": "",
    "save_bundle": "",
    "umask": "0022",
    "init_version": "1.0.0",
    "scope": "",
    "init_author_name": "",
    "git": "git",
    "unsafe_perm": "true",
    "tmp": "/var/folders/14/08r04n0d6fd0c9sp7btxl1sh0000gn/T",
    "onload_script": "",
    "prefix": "/Users/mgol/.nvm/versions/node/v4.0.0",
    "link": ""
  }
}

What file should I invoke ldd on?

@saper
Copy link
Member

saper commented Sep 8, 2015

Thanks. A .node file in your vendor directory.

@mgol
Copy link
Contributor

mgol commented Sep 8, 2015

Hmm, I don't have ldd. I have Xcode command line tools installed. The Internet is telling me on OS X one can use otool -L:

$ otool -L vendor/darwin-x64-46/binding.node 
vendor/darwin-x64-46/binding.node:
    /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 104.1.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1225.1.1)

@saper
Copy link
Member

saper commented Sep 8, 2015

Thank God we still have the Internet! Thanks.

@xzyfer
Copy link
Contributor Author

xzyfer commented Sep 8, 2015

Sorry, went to bed.

$ otool -L /Users/michael/Projects/Sass/node-sass/vendor/darwin-x64-44/binding.node
/Users/michael/Projects/Sass/node-sass/vendor/darwin-x64-44/binding.node:
    /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 60.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)

@saper
Copy link
Member

saper commented Sep 8, 2015 via email

@saper
Copy link
Member

saper commented Sep 10, 2015

Closed via #1133

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

No branches or pull requests

3 participants