Skip to content
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

Open
cakesoft-shashank opened this issue Dec 9, 2024 · 5 comments
Open

Lib doesn't build when installed from NPM #7

cakesoft-shashank opened this issue Dec 9, 2024 · 5 comments

Comments

@cakesoft-shashank
Copy link

When trying to install the library via NPM, the build process fails with the following error

> [email protected] build
> npm run rust-build && npm run swig-build


> [email protected] rust-build
> cargo build -F camel_case --manifest-path ./rgb-lib/bindings/c-ffi/Cargo.toml

error: manifest path `./rgb-lib/bindings/c-ffi/Cargo.toml` does not exist
@zoedberg
Copy link
Contributor

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 npm install rgb-lib from outside the project's directory. If instead you want to install the library from the source code first be sure to have the submodule checked out by doing git submodule update --init and then, before running npm install, build the library as documented in the README, with npm run build or npm run docker-build.

@cakesoft-shashank
Copy link
Author

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

@zoedberg
Copy link
Contributor

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 yarn add rgb-lib && yarn install, then run a small script that imports and uses rgb-lib and I haven't encountered any issue. What OS are you using?

@cakesoft-shashank
Copy link
Author

I am on mac OS 15.2 and tried to install the package on node 18 and 20.

rgb.mov

@zoedberg
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants