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

Failing to install dependencies #3

Closed
SirCameron opened this issue Aug 15, 2019 · 6 comments
Closed

Failing to install dependencies #3

SirCameron opened this issue Aug 15, 2019 · 6 comments
Assignees
Labels
blocked Blocked until its resolved somewhere else

Comments

@SirCameron
Copy link

I'm unable to run the example apps. npm install and yarn fail.

output:

> @nodegui/nodegui@0.1.1 install /Users/[redacted]/Web/react-nodegui/examples/weather-app-widget/node_modules/@nodegui/nodegui
> npm -v

6.10.1

> @nodegui/qode@1.0.0 postinstall /Users/[redacted]/Web/react-nodegui/examples/weather-app-widget/node_modules/@nodegui/qode
> node install.js

Local Qode 1.0.0 archive doesnt exists... Copying Qode from cache...
Extracting binaries...

> @nodegui/nodegui@0.1.1 postinstall /Users/[redacted]/Web/react-nodegui/examples/weather-app-widget/node_modules/@nodegui/nodegui
> npm run build:addon


> @nodegui/nodegui@0.1.1 build:addon /Users/[redacted]/Web/react-nodegui/examples/weather-app-widget/node_modules/@nodegui/nodegui
> node-gyp -j 8 configure build

  CC(target) Release/obj.target/nothing/../../node-addon-api/src/nothing.o
  TOUCH 8d54a0613d50a84adae49a5312f848b52b1b3ed9.intermediate
  ACTION binding_gyp_qtnode_target_symlink_qt_headers 8d54a0613d50a84adae49a5312f848b52b1b3ed9.intermediate
  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
rm 8d54a0613d50a84adae49a5312f848b52b1b3ed9.intermediate
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:190:23)
gyp ERR! stack     at ChildProcess.emit (events.js:196:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:256:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command "/usr/local/Cellar/node/12.1.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "-j" "8" "configure" "build"
gyp ERR! cwd /Users/[redacted]/Web/react-nodegui/examples/weather-app-widget/node_modules/@nodegui/nodegui
gyp ERR! node -v v12.1.0
gyp ERR! node-gyp -v v5.0.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @nodegui/nodegui@0.1.1 build:addon: `node-gyp -j 8 configure build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @nodegui/nodegui@0.1.1 build:addon script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/[redacted]/.npm/_logs/2019-08-15T19_04_16_298Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @nodegui/nodegui@0.1.1 postinstall: `npm run build:addon`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @nodegui/nodegui@0.1.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
@a7ul
Copy link
Collaborator

a7ul commented Aug 15, 2019

Is this only with this specific example or all of them?

@a7ul
Copy link
Collaborator

a7ul commented Aug 15, 2019

Could you try the starter repo https://github.com/nodegui/react-desktop-starter ?

@a7ul
Copy link
Collaborator

a7ul commented Aug 15, 2019

Alright this seems to be node-gyp issue.
libxmljs/libxmljs#469

Seems like you have python3 installed and node-gyp has issues with it. Would it be possible for you to try with python2 or alternatives as suggested on the above link?

I am planning to add precompiled binary support for this library. But until then this might help.

@jordanmkoncz
Copy link

jordanmkoncz commented Aug 16, 2019

@master-atul thanks for finding that, I had this issue too and I can confirm that switching to Python 2 for the installation resolves it.

If you have Python installed using pyenv (https://github.com/pyenv/pyenv), this is very easy to do (and if you don't have Python installed using pyenv, I highly recommend it). Basic steps with pyenv:

  • pyenv install 2.7.16 (assuming a version of Python 2 is not already installed)
  • pyenv shell 2.7.16
  • npm install

These steps will set your current shell/terminal so that only Python 2 is available, and then when you run npm install from that same shell, the installation/build works.

@a7ul
Copy link
Collaborator

a7ul commented Aug 16, 2019

Related node-gyp issues: nodejs/node-gyp#193

@a7ul a7ul added the blocked Blocked until its resolved somewhere else label Aug 16, 2019
@a7ul a7ul self-assigned this Aug 16, 2019
@a7ul
Copy link
Collaborator

a7ul commented Aug 17, 2019

Will update Readme and close this issue : https://github.com/nodegui/nodegui/projects/1#card-25295641

@a7ul a7ul closed this as completed Aug 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked until its resolved somewhere else
Projects
None yet
Development

No branches or pull requests

3 participants