depjs / dep

A little Node.js dependency installer
https://github.com/depjs/dep#readme
MIT License
189 stars 15 forks source link

Strange error using `dep install` #65

Open austinfrey opened 6 years ago

austinfrey commented 6 years ago

Summary

Write here. Getting an error when installing packages. Packages seem to have installed properly but the error is a bit misleading.

Steps to reproduce behavior

Write here.

$ dep i hypercore

Expected behavior

Write here. Successful installs should exit silently.

$ dep i hypercore
Resolving dependencies
Installing dependencies
Building dependencies
Installed 105 packages in 4.175s

Actual behavior

Write here.

$ dep i hypercore
Resolving dependencies
Installing dependencies
Building dependencies
In file included from ../binding.cc:4:0:
../libsodium/src/libsodium/include/sodium.h:5:10: fatal error: sodium/version.h: No such file or directory
 #include "sodium/version.h"
          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Release/obj.target/sodium/binding.o] Error 1
Installed 107 packages in 4.333s
austinfrey commented 6 years ago

Digging deeper, the error is specific to the above hypercore package, but since I'd added it to package.jsonthe error was appearing in subsequent package installs since it looks like dep will iterate through all packages listed in package.json even when installing a single package. Is that expected?

watilde commented 6 years ago

Thank you for your investigation! I just thought that can be related to native-build and that was about sodium-native. Probably, the order is glitched a bit around here, will figure out.

$ dep install sodium-native
Resolving dependencies
Installing dependencies
Building dependencies
In file included from ../binding.cc:4:
../libsodium/src/libsodium/include/sodium.h:5:10: fatal error: 'sodium/version.h' file not found
#include "sodium/version.h"
         ^~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/sodium/binding.o] Error 1
Installed 143 packages in 11.674s