I have forked the https://github.com/stoplightio/elements
repo into my own GitHub account.
Now, I pushed a commit into it and in another react project, say Invitation-App
, I want to use this as a package at that commit. So, I copied the commit hash of the newly added commit and in the Invitation-App. I added this in package.json
in devDependencies
:
`"stoplight-elements": "git+ssh://git@github.com:myOwnGitHubId/elements.git#98rhj3bn20a4be5bc35962h27yr6t4j5ec65ef8f",`
where the trailing hash is the commit hash of the commit I've added.
Now, when I do yarn install
, it says,
yarn install v1.22.19
[1/4] Resolving packages...
error Can't add "stoplight-elements": invalid package version undefined.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
What is the issue? And how can I fix this?
I tried creating another React repository named "Temporary-App" and pushed a commit into it. I tried it in the same way as this and it worked. I couldn't understand why it's not working for this cloned elements
repo. I couldn't find any help online.