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

Cannot read property 'targets' of undefined #17

Closed
johnnyman727 opened this issue Feb 16, 2016 · 3 comments
Closed

Cannot read property 'targets' of undefined #17

johnnyman727 opened this issue Feb 16, 2016 · 3 comments

Comments

@johnnyman727
Copy link
Contributor

Packages affected:

The compilation of fails because of some pre-gyp errors:

vagrant up;
./compile.sh ws
downloading package...
total 12
drwxrwxr-x 3 vagrant vagrant 4096 Feb 16 17:11 .
drwxr-xr-x 3 vagrant root    4096 Feb 16 17:11 ..
drwxrwxr-x 2 vagrant vagrant 4096 Feb 16 17:11 build
Connection to 127.0.0.1 closed.
running build...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7731  100  7731    0     0  30657      0 --:--:-- --:--:-- --:--:-- 30678
=> nvm is already installed in /home/vagrant/.nvm, trying to update using git
=>
=> Source string already in /home/vagrant/.bashrc
=> Close and reopen your terminal to start using nvm
v4.2.1 is already installed.
Now using node v4.2.1 (npm v2.14.7)
Now using node v4.2.1 (npm v2.14.7)
/home/vagrant/.nvm/versions/node/v4.2.1/bin/pre-gypify -> /home/vagrant/.nvm/versions/node/v4.2.1/lib/node_modules/pre-gypify/pre-gypify.js
npm WARN deprecated [email protected]: This package has been renamed. Use lodash.padstart@^4.0.0.
npm WARN deprecated [email protected]: This package has been renamed. Use lodash.padend@^4.0.0.
/home/vagrant/.nvm/versions/node/v4.2.1/bin/node-gyp -> /home/vagrant/.nvm/versions/node/v4.2.1/lib/node_modules/node-gyp/bin/node-gyp.js
/home/vagrant/.nvm/versions/node/v4.2.1/bin/node-pre-gyp -> /home/vagrant/.nvm/versions/node/v4.2.1/lib/node_modules/node-pre-gyp/bin/node-pre-gyp
[email protected] /home/vagrant/.nvm/versions/node/v4.2.1/lib/node_modules/pre-gypify
├── [email protected]
└── [email protected] ([email protected], [email protected])

[email protected] /home/vagrant/.nvm/versions/node/v4.2.1/lib/node_modules/node-gyp
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected])

[email protected] /home/vagrant/.nvm/versions/node/v4.2.1/lib/node_modules/node-pre-gyp
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp http GET https://nodejs.org/dist/v4.2.1/node-v4.2.1-headers.tar.gz
gyp http 200 https://nodejs.org/dist/v4.2.1/node-v4.2.1-headers.tar.gz
gyp http GET https://nodejs.org/dist/v4.2.1/SHASUMS256.txt
gyp http 200 https://nodejs.org/dist/v4.2.1/SHASUMS256.txt
4.2.1
gyp info ok
+ pre-gypify --package_name '{name}-{version}-{configuration}.tgz'
/home/vagrant/.nvm/versions/node/v4.2.1/lib/node_modules/pre-gypify/pre-gypify.js:9
    var targetName = data.targets.filter(function (target) {
                         ^

TypeError: Cannot read property 'targets' of undefined
    at Immediate._onImmediate (/home/vagrant/.nvm/versions/node/v4.2.1/lib/node_modules/pre-gypify/pre-gypify.js:9:26)
    at processImmediate [as _immediateCallback] (timers.js:368:17)
Connection to 127.0.0.1 closed.
@johnnyman727 johnnyman727 changed the title Compiling ws fails Cannot read property 'targets' of undefined Apr 10, 2016
@johnnyman727
Copy link
Contributor Author

This also affects flocking.

@tcr
Copy link
Member

tcr commented Sep 23, 2016

Fixed in pre-gypify to warn about these.

ws is not a gyp module:

+ pre-gypify --package_name '{name}-{version}-{configuration}-{node_abi}-{platform}-{arch}.tgz'
binding.gyp does not exist.
Are you sure this is a binary node module?
Connection to 127.0.0.1 closed.

usb doesn't fail with this error:

+ pre-gypify --package_name '{name}-{version}-{configuration}-{node_abi}-{platform}-{arch}.tgz'
writing package.json...
kk
+ echo 'Release build'
Release build
+ node-pre-gyp rebuild --target_platform=linux --target_arch=mipsel --target=4.5.0
...

ppps is not a gyp module:

+ pre-gypify --package_name '{name}-{version}-{configuration}-{node_abi}-{platform}-{arch}.tgz'
binding.gyp does not exist.
Are you sure this is a binary node module?
Connection to 127.0.0.1 closed.

flocking is not a gyp module:

+ pre-gypify --package_name '{name}-{version}-{configuration}-{node_abi}-{platform}-{arch}.tgz'
binding.gyp does not exist.
Are you sure this is a binary node module?
Connection to 127.0.0.1 closed.

@johnnyman727
Copy link
Contributor Author

Looks like ws made it's two binary modules opt-in since this issue was made. Also, both bufferutil and utf-8-validate compile properly.

usb fails with the following error which is not related to this reported issue:

make: Entering directory '/root/build/package/build'
  CC(target) Release/obj.target/libusb/libusb/libusb/core.o
  CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
  CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o
  CC(target) Release/obj.target/libusb/libusb/libusb/io.o
  CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o
  CC(target) Release/obj.target/libusb/libusb/libusb/sync.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_udev.o
../libusb/libusb/os/linux_udev.c:40:21: fatal error: libudev.h: No such file or directory
 #include <libudev.h>

ppps depends on USB and fails for the same reason

flocking does not depend on any binary modules either as far as I can tell.

👍

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

No branches or pull requests

2 participants