Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coffeescript executable doesn't follow symlinks when looking up require()'d packages #1715

Closed
josephg opened this issue Sep 19, 2011 · 2 comments
Labels

Comments

@josephg
Copy link

josephg commented Sep 19, 2011

Lets say I have a package:

main.coffee
node_modules/coolstuff

main.coffee:

require 'coolstuff'
# ...

I can run this module using coffee main.coffee and it works.

If I instead make a symlink to main.coffee from somewhere else and run coffee mysymlink.coffee it doesn't work, because it can't find the coolstuff module.

This isn't the case with nodejs - if you write the equivalent javascript, symlink it and run it with node mysymlink.js it works.

Npm installs package binaries this way. On my machine, /usr/local/bin/myscript is a symlink to /usr/local/lib/node_modules/mylibrary/myscript . The script can't find the library's dependancies because its not looking for them in the library's node_modules directory.

@michaelficarra
Copy link
Collaborator

related: satyr/coco@afdc975

@jashkenas jashkenas removed this from the as soon as a patch is available milestone Jun 2, 2015
@GeoffreyBooth
Copy link
Collaborator

The coffee command is intended primarily for compiling and debugging, not as a replacement for node. A patch for this would be welcome, but we don’t plan to try to support all the edge cases that node supports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants