archway-network / cli

Develop WASM smart contracts with the Archway network developer CLI
https://docs.archway.io
Apache License 2.0
44 stars 21 forks source link

npm install @archwayhq/cli failing on mac osx m1 #310

Closed 4coffeeihadbreakfast closed 7 months ago

4coffeeihadbreakfast commented 7 months ago

i was having issues installing this package globally on Apple M1, was able work around it by creating a virtual python environment (intel64) and installing it there.

i.e

python3-intel64 -m venv venv_dev

The issue:

npm ERR! warning: /Library/Developer/CommandLineTools/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols)
npm ERR! ../src/keyring.cc:2:10: fatal error: '../out/keyring.h' file not found
npm ERR! #include "../out/keyring.h"
npm ERR!          ^~~~~~~~~~~~~~~~~~
npm ERR! 1 error generated.

solution:

 LDFLAGS="-L/opt/homebrew/lib" CPPFLAGS="-I/opt/homebrew/include" LIBRARY_PATH="$LIBRARY_PATH:$(brew --prefix)/lib" npm install @archwayhq/cli

(i use homebrew)

Filing and closing this, hopefully it will save someone time.

4coffeeihadbreakfast commented 7 months ago

update: this didn't actually work. i.e. archway accounts list would throw an dlopen error