nostr-dev-kit / ndk

Nostr Development Kit with outbox-model support
MIT License
352 stars 95 forks source link

Installing NDK from git source so that I can test latest doesn't work. Also, new release soon? #244

Closed jeremyd closed 3 months ago

jeremyd commented 3 months ago

I need some of these commits from the last month since the last version.. When I attempt to install from a git source, npm fails. So I also tried a local checkout so I can use npm link or something, and when I run the build, same errors as follows:

npm error code EUNSUPPORTEDPROTOCOL
npm error Unsupported URL Type "workspace:": workspace:*

So then I try with yarn, and it says:

[1/5] Validating package.json...
[2/5] Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/@nostr-dev-kit%2feslint-config-custom: Not found".

I am interested in running off master branch because I want the fixes for NIP42 auth and to help debug NDK in general, I dislike running old packages for stuff that's bleeding edge. What am I missing here? Or is the build just broken?

jeremyd commented 3 months ago

I think I'm in over my head here. My humble project uses npm. I see ndk uses pnpm and yarn. I will need to come up to speed on these and then maybe i stand a chance of using git urls for NDK packages.. Yarn seems confused and keeps asking for a version, but the git repo has no version tags etc .. I'm curious what your development environment looks like for doing this kind of stuff maybe it will help me understand what I would need to do.

jeremyd commented 3 months ago

I think I figured it out. What I did was, I checked out the repo, then I cd'd into ndk/ndk and ran pnpm install. This compiled. Then I ran npm link. And then went to my project and did npm link @nostr-dev-kit/ndk. Seems to be working! Yay.

It would be nice to have docs for how to build. This repo has no tags, and no build docs... In retrospect, this makes me not feel very good about using it since there is no visibility into how this code ends up as a package in the repository.

pablof7z commented 3 months ago

added a BUILD.md file

jeremyd commented 3 months ago

Thank you! Also please consider tagging the releases so that it would be easier to fork off an existing release.