Skip to content

node-gyp cannot rebuild #22

@jonbondani

Description

@jonbondani

Hi,
I'm trying to install a nodejs project that uses weak-napi as a dependency of another package.
I've tried several node, yarn, python and node-gyp versions, all with the same result:

yarn install
yarn install v1.19.1
info No lockfile found.
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
[-/7] ⢀ waiting...
[-/7] ⢀ waiting...
[-/7] ⢀ waiting...
[4/7] ⢀ weak-napi
error /Users/****/node_modules/weak-napi: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /Users/****/node_modules/weak-napi
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@5.0.3
gyp info using node@10.17.0 | darwin | x64
gyp info find Python using Python version 2.7.10 found at "/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python"
gyp http GET https://nodejs.org/download/release/v10.17.0/node-v10.17.0-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v10.17.0/node-v10.17.0-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v10.17.0/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v10.17.0/SHASUMS256.txt
gyp info spawn /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
gyp info spawn args [ '/Users/****/.nvm/versions/node/v10.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/****/node_modules/weak-napi/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/****/.nvm/versions/node/v10.17.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/****/Library/Caches/node-gyp/10.17.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/****/Library/Caches/node-gyp/10.17.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/****/.nvm/versions/node/v10.17.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/****/Library/Caches/node-gyp/10.17.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/****/node_modules/weak-napi',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CC(target) Release/obj.target/nothing/../node-addon-api/src/nothing.o
  LIBTOOL-STATIC Release/nothing.a
Traceback (most recent call last):
  File "./gyp-mac-tool", line 611, in <module>
    sys.exit(main(sys.argv[1:]))
  File "./gyp-mac-tool", line 30, in main
    exit_code = executor.Dispatch(args)
  File "./gyp-mac-tool", line 45, in Dispatch
    return getattr(self, method)(*args[1:])
  File "./gyp-mac-tool", line 248, in ExecFilterLibtool
    if not libtool_re.match(line) and not libtool_re5.match(line):
TypeError: cannot use a string pattern on a bytes-like object
make: *** [Release/nothing.a] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/****/.nvm/versions/node/v10.17.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:193:23)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Darwin 18.7.0
gyp ERR! command "/Users/****/.nvm/versions/node/v10.17.0/bin/node" "/Users/****/.nvm/versions/node/v10.17.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/****/node_modules/weak-napi****

I've opened an issue in the node-gyp's git as well but I think the problem is related to the weak-napi installation.

Can you help me with this issue, please? Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions