Skip to content


Subversion checkout URL

You can clone with
Download ZIP


How to avoid using install scripts for local development? #3025

domenic opened this Issue · 2 comments

3 participants


So I have a package, widgetA. And another package, mainApp. These are entirely for local development and will never be published to npm.

widgetA contains Stylus, which needs to get compiled to CSS before mainApp sees it. At first I thought, oh, I'll use a "postinstall" script! But then I reflected on recent events and changed it to "prepublish". That should work great, right?

Then I went to actually carry out my workflow:

$ cd /path/to/projectRoot
$ cd widgetA
$ npm link
$ cd ../mainApp
$ npm link widgetA
$ npm install

Unfortunately, my "prepublish" script for widgetA was never run!

Even worse, when I changed to "postinstall", it was run!

So what's a locally-developing developer, who doesn't like antipatterns, to do?


Yes, this is a bug. link should run prepublish.

Workaround for now: cd /path/to/projectRoot/widgetA; npm install


@domenic npm link runs the prepublish script now, looks like this can be closed?


@domenic domenic closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.