Skip to content

--tarball option doesn't work on windows (node.lib) #1002

Closed
@gibfahn

Description

@gibfahn

node-gyp build --tarball=C:\path\to\tarball works on Unix but not on Windows, as node-gyp also requires the node.lib file to be in ~/.node-gyp.

If you have a node source directory you can use --nodedir=C:\path\to\node

Possible fixes are:

  1. Add the node.lib files to the release tarballs (ia32 and x64)
    • Requires changes to the node build process, shouldn't be too difficult, and doesn't increase the tarball size much.
  2. Add another option to specify the location of the lib file (e.g. --node-lib=C:\path\to\node.lib)
    • Unintuitive, but an easy change
  3. Don't add the node.lib files to the release tarballs, but still accept tarballs with node.lib files in them
    • Complicates things

If there are any other alternatives let me know!

Error

C:\Users\gib\node\test\gc\node_modules\weak>node-gyp build --tarball=C:\Users\gib\node\node-v6.3.1-headers.tar.gz
gyp info it worked if it ends with ok
gyp info using node-gyp@3.4.0
gyp info using node@6.3.1 | win32 | x64
gyp ERR! build error
gyp ERR! stack Error: ENOENT: no such file or directory, open 'C:\Users\gib\.node-gyp\6.3.1\x64\node.lib'
gyp ERR! stack     at Error (native)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\gib\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--tarball=C:\\Users\\gib\\node\\nh.tar.gz"
gyp ERR! cwd C:\Users\gib\node\test\gc\node_modules\weak
gyp ERR! node -v v6.3.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions