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

Getting the following error. Everything specified is installed. #74

Open
pixelpax opened this issue Apr 10, 2016 · 8 comments
Open

Getting the following error. Everything specified is installed. #74

pixelpax opened this issue Apr 10, 2016 · 8 comments

Comments

@pixelpax
Copy link

✗ Could not properly compile test addon, did not load binding
✗ /usr/local/lib/node_modules/goingnative/exercises/am_i_ready/child.js:17
✗ if (binding.test !== 'OK') {
✗ ^
✗ TypeError: Cannot read property 'test' of undefined
✗ at Object. (/usr/local/lib/node_modules/goingnative/exercises/am_i_ready/child.js:17:12)
✗ at Module._compile (module.js:397:26)
✗ at Object.Module._extensions..js (module.js:404:10)
✗ at Module.load (module.js:343:32)
✗ at Function.Module._load (module.js:300:12)
✗ at Function.Module.runMain (module.js:429:10)
✗ at startup (node.js:139:18)
✗ at node.js:999:3
✗ Test binding file works as expected

@rvagg
Copy link
Contributor

rvagg commented Apr 11, 2016

is that the only output? can you provide details on your operating system and version of Node.js please?

@pixelpax
Copy link
Author

I'm using #38-Ubuntu SMP with 3.19.0-33-generic kernel.

Node is v5.4.1
gcc (Ubuntu 4.9.2-10ubuntu13) 4.9.2

Here's the full output:

✓ Found usable `node` version: v5.4.1
✓ Found usable `gcc` in $PATH: v4.9.2
✓ Found usable `python` in $PATH: v2.7.9
✓ Found usable `node-gyp` in $PATH: v0.12.2
Running `node-gyp`, this may take a few minutes if it hasn't been run before...
make: Entering directory '/media/gabriel/Windows8_OS/Users/Gabriel/Dropbox/goingnative/~test-addon.7522/build'
  CXX(target) Release/obj.target/test/test.o
  SOLINK_MODULE(target) Release/obj.target/test.node
  SOLINK_MODULE(target) Release/obj.target/test.node: Finished
  COPY Release/test.node
make: Leaving directory '/media/gabriel/Windows8_OS/Users/Gabriel/Dropbox/goingnative/~test-addon.7522/build'
✓ Compiled test package
✓ Found compiled test binding file
✗ Could not properly compile test addon, error finding binding: Module did not self-register.
✗ Could not properly compile test addon, did not load binding
✗ /usr/local/lib/node_modules/goingnative/exercises/am_i_ready/child.js:17
✗ if (binding.test !== 'OK') {
✗            ^
✗ TypeError: Cannot read property 'test' of undefined
✗     at Object.<anonymous> (/usr/local/lib/node_modules/goingnative/exercises/am_i_ready/child.js:17:12)
✗     at Module._compile (module.js:397:26)
✗     at Object.Module._extensions..js (module.js:404:10)
✗     at Module.load (module.js:343:32)
✗     at Function.Module._load (module.js:300:12)
✗     at Function.Module.runMain (module.js:429:10)
✗     at startup (node.js:139:18)
✗     at node.js:999:3
✗ Test binding file works as expected

# FAIL

@rvagg
Copy link
Contributor

rvagg commented Apr 11, 2016

@HeroicAutodidact would you mind trying it in a different directory? It could be that the file system type that's being used isn't playing so nicely here. Perhaps switch to /tmp/ and run through it again and see if it makes a difference. The fact that's it's getting past the compile step suggests that it's something to do with loading from the filesystem .. I think

@pixelpax
Copy link
Author

Alright, I tried this, identical message. I've also tried locally installing goingnative, and I've tried executing gonative as root.

Any other ideas?

Is there someplace I can see which commands are being executed by gonative during the verify step? I can try executing individually and testing where the error is.

@retrohacker
Copy link
Contributor

@HeroicAutodidact

https://github.com/workshopper/goingnative/blob/master/exercises/am_i_ready/child.js#L13-L19

The line immediately above accessing .test checks to see if binding is defined and outputs an error.

@rvagg shouldn't we be breaking execution when each of those checks fail?

@rvagg
Copy link
Contributor

rvagg commented Apr 11, 2016

https://github.com/workshopper/goingnative/blob/master/exercises/am_i_ready/exercise.js

it's compiling an addon in ../../packages/test-addon/ and then trying to load it with child.js.

@rvagg
Copy link
Contributor

rvagg commented Apr 11, 2016

@retrohacker it is broken when one fails, as it has in this case, the callback in each of the processors controls that, the false as a second argument indicates a proper fail.

@retrohacker
Copy link
Contributor

We can at least avoid the TypeError for referencing a value we already know is undefined from a previous check.

if(binding != null && binding.test !== 'OK')

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

3 participants