-
Notifications
You must be signed in to change notification settings - Fork 2
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
Lib doesn't build when installed from NPM #7
Comments
Are you sure you're installing the library from NPM? From the logs it seems you are installing from the project. If you want to install the library from NPM please run |
I tried to add the npm package using yarn add rgb-lib. While the library downloads successfully, the build process fails with the error mentioned above |
Could you please clarify what do you mean for "the build process fails"? I've run |
I am on mac OS 15.2 and tried to install the package on node 18 and 20. rgb.mov |
The error logs in the video are different from those you mentioned above. Are you sure the first time you weren't trying to do a local installation? Could you please post the correct error logs in text form? I've tried to install it on a mac OS 12 (with node 20) and had no issues. Is your mac using an ARM chip? Is there anything else that's worth mentioning about your setup? |
Yes, I was trying to install the lib locally using npm. My Mac is ARM-based and running macOS 15.2. Are there any additional installation steps I need to follow? The lib works fine when added as a local dependency, but not when installed as an npm dependency. |
Could you please post the correct error logs in text form?
No, there aren't additional steps. Have you tried installing the lib via npm instead of yarn? |
Yes I have tried that. Here is the full error log
Looks like |
Assuming you meant "built locally" instead of "added as a local", this is strange. Are you sure about this? Were you using the same machine (ARM-based Mac os)? If so, could you please clarify all the steps you did to build it, install it and check it works fine? My guess is that the issue is related to the shared library ( |
Yes, both are on the same machine. I followed the steps menthined here to build the library locally. After that, I added it as a local dependency in package.json using: "rgb-lib": "file:../rgb-lib-nodejs/rgb-lib" |
The README section you linked has instructions for both building locally and in docker, which ones did you follow? Please share the exact commands you gave Also, have you then checked that the library actually works? |
I followed local installation, and the library works perfectly. I'm currently using it in a nodejs server project. After cloning the repo, I simply ran yarn build to build it. |
After building it locally what files do you find in |
And what files do you find in |
I think you are looking into the wrong
From the screenshot it's not clear if you are showing the correct path and if the directory is actually empty. |
@cakesoft-shashank I think I understood the cause of the error. Please try to run |
Getting this error when installing tar in an empty dir
|
Ok. Now please redo the same but on the |
|
Ok, good. We'll need to decide if we should include the dylib in the package or use other solutions to avoid making the package too big. Currently the team is on holiday though, so I'm not sure when we'll be able to do this |
Ok, please let me know when you update. Thank you! |
When trying to install the library via NPM, the build process fails with the following error
The text was updated successfully, but these errors were encountered: