Closed caffeinum closed 6 years ago
The problem seems to be specific to our project, but it occurs on both Mac OS and Ubuntu.
In the fresh npm init
project node-gyp
fails too, but with another error:
> nimiq@1.0.1 install /Users/caffeinum/Web/empty/node_modules/nimiq
> node-gyp rebuild
make: *** No rule to make target `Release/obj.target/nimiq_node/src/native/argon2.o', needed by `Release/nimiq_node.node'. Stop.
P.S. running npm install @nimiq/core
gives the same error, yarn add nimiq
too.
Though yarn add @nimiq/core
seems to work.
The nimiq
package is not maintained by the Nimiq team. The official packages are under the @nimiq
namespace, such as @nimiq/core
.
Can you please post the error you get when you npm install @nimiq/core
? And on what OS and what node version are you on (because "it works for me")?
I get this error on osx el capitan 10.11.6 and node v8.11.2:
3 warnings generated.
CC(target) Release/obj.target/node-lmdb/dependencies/lmdb/libraries/liblmdb/midl.o
CXX(target) Release/obj.target/node-lmdb/src/node-lmdb.o
CXX(target) Release/obj.target/node-lmdb/src/env.o
CXX(target) Release/obj.target/node-lmdb/src/misc.o
../src/misc.cpp:28:8: error: thread-local storage is not supported for the current target
static thread_local uint32_t currentUint32Key = 0;
^
1 error generated.
make: *** [Release/obj.target/node-lmdb/src/misc.o] Error 1
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: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 Darwin 15.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/mrrovot/dev/nimiq/nimiq-wrapper/nimiqnode/node_modules/node-lmdb
@mrrovot It looks like the thread-local storage
is not supported on your system. Quick googling of this error (error: thread-local storage is not supported for the current target
) let me to here:
https://github.com/WebAssembly/binaryen/issues/1035 https://github.com/facebook/redex/issues/240
It seems like you need to update your XCode to version 8.x
@sisou
I have the same error as @mrrovot
@sisou sorry, I can't reproduce this error, that may have been previous Nimiq version or another NodeJS version (v10 fails many other packages, e.g.).
However, I can't use @nimiq/core
package for browser. Should it work in the React/Angular Webpack builds?
This seems to be resolved.
New issue checklist
README
General information
Bug report
Expected behavior
Add
nimiq
module to the project as a dependencyActual behavior
Crash.
Steps to reproduce
In the project, try adding
nimiq
Crash log? Screenshots? Videos? Sample project?
Can attach debug.log file if needed.