discord / erlpack

High Performance Erlang Term Format Packer
MIT License
217 stars 64 forks source link

Problems with installation #15

Open itsariadust opened 6 years ago

itsariadust commented 6 years ago

tried installing erlpack to fix my installation issues with npm but here's what happens:

> erlpack@0.1.2 install C:\Users\RAP\AppData\Roaming\npm\node_modules\erlpack
> node-gyp rebuild

C:\Users\RAP\AppData\Roaming\npm\node_modules\erlpack>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  adler32.c
  compress.c
  crc32.c
  deflate.c
  gzclose.c
  gzlib.c
  gzread.c
  gzwrite.c
  infback.c
  inffast.c
  inflate.c
  inftrees.c
  trees.c
  uncompr.c
  zutil.c
  win_delay_load_hook.cc
  zlib.vcxproj -> C:\Users\RAP\AppData\Roaming\npm\node_modules\erlpack\build\Release\\zlib.lib
  erlpack.cc
  win_delay_load_hook.cc
C:\Users\RAP\.node-gyp\8.11.1\x64\node.lib : fatal error LNK1127: library is corrupt [C:\Users\RAP\AppData\Roaming\npm\node_modules\erlpack\
build\erlpack.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\RAP\AppData\Roaming\npm\node_modules\erlpack
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! erlpack@0.1.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the erlpack@0.1.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\RAP\AppData\Roaming\npm-cache\_logs\2018-04-29T02_31_51_064Z-debug.log

how can I fix this issue?

MEXdave1997 commented 5 years ago

Would it be possible for you to post that logfile (the one that is given in the path at the very bottom).

Also, this seems to be a general issue with node-gyp, and I have since posted about it in the node-gyp repo, seen here.

MEXdave1997 commented 5 years ago

So after continually trying to build erlpack, I see these error messages pop up:

./js/erlpack.cc:42:11: error: variable or field ‘Init’ declared void
 void Init(Handle<Object> exports) {
           ^~~~~~
../js/erlpack.cc:42:11: error: ‘Handle’ was not declared in this scope
../js/erlpack.cc:42:11: note: suggested alternative: ‘daddl’
 void Init(Handle<Object> exports) {
           ^~~~~~
           daddl
../js/erlpack.cc:42:24: error: expected primary-expression before ‘>’ token
 void Init(Handle<Object> exports) {
                        ^
../js/erlpack.cc:42:26: error: ‘exports’ was not declared in this scope
 void Init(Handle<Object> exports) {
                          ^~~~~~~
In file included from ../../nan/nan.h:54,
                 from ../js/erlpack.cc:1:
../js/erlpack.cc:47:22: error: ‘Init’ was not declared in this scope
 NODE_MODULE(erlpack, Init);

Not sure if that is related in any way :thinking:

trackpadpro commented 4 years ago

I am having the same issues. My bot no longer works and I think it is because I need these dependencies, but they no longer install properly. Anyone get it to work?

esunder commented 4 years ago

@trackpadpro This is probably a breaking change between newer nodejs versions. I downgraded from node12 to node10 and it successfully compiles.

MEXdave1997 commented 4 years ago

this may sound like a stupid question, but how did you perform the downgrade? did you just do a reinstall?

esunder commented 4 years ago

I don't remember the exact steps but first uninstall the current version, then you can specify the exact version to install with apt (assuming ubuntu-like distro)

esunder commented 4 years ago

https://joshtronic.com/2018/05/08/how-to-install-nodejs-10-on-ubuntu-1804-lts/

cclauss commented 2 years ago

gyp ERR! node-gyp -v v3.6.2

The current of node-gyp https://github.com/nodejs/node-gyp/releases