I'm building a package with coffee-script. I want to publish only compiled JS, so I follow what seems to be the common practice, with coffee compilation as a prepublish script.
I have src/ with .coffee sources, and lib/ with compiled JS. In package.json's scripts.prepublish I have coffee -o lib -c src. This works when running npm install, probably also with npm publish (I'm publishing). But when running sudo npm link it throws:
coffee -o lib -c src
sudo npm link
npm WARN cannot run in wd firstname.lastname@example.org coffee -o lib -c src (wd=/home/skrat/Workspace/xxx/fp.engine)
/usr/lib/node_modules/fp.engine -> /home/skrat/Workspace/xxx/fp.engine
Is this still a problem for you? Can you check with the latest npm?
I don't think the behavior of lifecycle scripts has changed since you reported this, so it may still be an issue. Or you may have found a workaround -- if so, please let me know and I'll add it to my proto-knowledgebase.
We are trying to clean up older npm issues, so if we don't hear back from you within a week, we will close this issue. (Don't worry -- you can always come back again and open a new issue!)
Closing as abandoned.