question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enable npm install of forked hyperapp versions

See original GitHub issue

Since I have a pull request out (“keyed-vdom”), and I would like to continue my personal project using my forked version of hyperapp, I tried

npm install zaceno/hyperapp#keyed-vdom

(as well as adding that line to dependencies in my package json and doing npm install).

But that does’nt work… npm pulls down something for me that looks right, but there is no dist/ folder. Nothing gets built. And rollup config file is missing besides.

The only way of getting “my” hyperapp-branch into my project is to:


cd node_modules
git clone https://github.com/zaceno/hyperapp.git
cd hyperapp
git checkout keyed-vdom
npm install

I don’t know enough about package.json scripts and publishing packages on npm to know if it’s possible, but it would be great just to be able to specify a forked repo and branch in the "dependencies": {... of my project. And have npm install just do all the work.

Make sense?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
zacenocommented, Mar 13, 2017

@lukejackson thanks for the tip, but even if that worked, I would be adding something to my fork that wouldn’t belong in any PR’s I make from that fork later. So I don’t really need the tips myself so much as want it in the main repo (wishing it was there already).

I’ll look into making a PR specifically for this (later, when I’m done with the PR I’m already working on 😉 )

1reaction
lukejacksonncommented, Mar 13, 2017

@zaceno I am not 100% on this but could you add a postinstall script to the package.json of your fork. It should build the project (thus creating the dist folder and contents) upon install.

"scripts": {
  "postinstall": "npm run build"
}

Point npm to your fork of hyperapp in the dependencies of your project

"dependencies": {
  "hyperapp": "git://github.com/<user>/<project>.git#<branch>"
}

and run npm install

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm install and build of forked github repo - Stack Overflow
Try npm install <ghusername>/<repoName> , where <ghUsername> is your GitHub username (without the @ ) and <repoName> is the name of the ...
Read more >
jorgebucaran/hyperapp: 1kB-ish JavaScript ... - GitHub
GitHub - jorgebucaran/hyperapp: 1kB-ish JavaScript framework for building hypertext applications. ... Installation. npm install hyperapp ...
Read more >
How to Use Forked NPM Dependencies in React | Pluralsight
Using A Forked NPM Dependency. In order to install a forked dependency into your project or app, you first need to create a...
Read more >
hyperapp - npm
The tiny framework for building hypertext applications.. Latest version: 2.0.22, last published: 9 months ago. Start using hyperapp in your ...
Read more >
How to use your own fork from a node module library
So here are the options that allow our project to use the fork ... 2. npm install will use the forked module package.json...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found