substack/node-findit — Issue #7: Dead symlink is causing problems
Author: derdesign
Created: 2012-01-06 14:07:32+00:00
State: open

On the tests/ directory, there is a `dangling-symlink` symbolic link that purposedly does not exist. Now, this is fine but can cause some other node modules that require scanning of a directory's file structure to fail.

I personally have encountered this problem in [CoreJS](http://github.com/derdesign/CoreJS), since I needed to patch it to work with the `dangling-symlink`. See [here](https://github.com/derdesign/CoreJS/blob/back-to-js/tools/remove-sys-notice.js).

Now, I've just noticed the symlink is also causing trouble with [nide](http://coreh.github.com/nide/), which fails to work because of the symlink, here's the error:

```plain
Created project directory
Added project directory to .gitignore
Added project directory to .npmignore
Nide running at http://localhost:8123

/usr/local/lib/node_modules/nide/server/project.js:154
if (err) throw err
^
Error: ENOENT, no such file or directory '/Users/der/Node/core-js/node_modules/haml-coffee/node_modules/findit/test/symlinks/dir1/dangling-symlink'

```

I think it's better to create the symlink dynamically, while the test is running, and remove it after tests are finished.

Also, the symlink can be created when the tests are first run, and left there, as long as the file is ignored on your `.gitignore`.

Regards,
Ernie.-