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

npm link xrpl doesn't work properly #2704

Open
mvadari opened this issue Jun 7, 2024 · 2 comments
Open

npm link xrpl doesn't work properly #2704

mvadari opened this issue Jun 7, 2024 · 2 comments
Labels

Comments

@mvadari
Copy link
Collaborator

mvadari commented Jun 7, 2024

Reproduction:

  • Run npm i -g xrpl
  • Then try running a script with const xrpl = require("xrpl")
  • It fails with a MODULE_NOT_FOUND error
  • Try then running npm link xrpl to link the global module in locally
  • You get the following error:
npm error code 127
npm error path /usr/local/lib/node_modules/xrpl
npm error command failed
npm error command sh -c copyfiles ../../README.md xrpl/README.md
npm error sh: 1: copyfiles: not found

I believe this is because the prepare script is running - that line was added here: #2530

@mvadari mvadari added the bug label Jun 7, 2024
@ckeshava
Copy link
Collaborator

will it help if you install the copyfiles package? npm install copyfiles -g ?

@mvadari
Copy link
Collaborator Author

mvadari commented Jun 12, 2024

will it help if you install the copyfiles package? npm install copyfiles -g ?

Yes, but I shouldn't need to install a separate package to be able to run npm link xrpl.

I don't think just adding copyfiles to the normal, non-dev dependencies is the answer either, but I don't understand npm link well enough to understand what's happening here.

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

No branches or pull requests

2 participants