I'm on cygwin to do unix commands on win7 (launched cygwin.bat in windows cmd prompt).
My project directories are created in root like this:
$ mkdir -p app/models
$ mkdir -p app/node_modules
Then the symlink is created:
$ cd app/node_modules
$ ln -sf ../models
Back on the /app/
directory, I go into Node console to launch the module located in
app/models/movie.js
:
Movie = require('models/movie');
But I get the following error:
Cannot find module 'models/movie'
ln
takes 2 arguments, not one.
I found out that cygwin doesn't really create actual symlinks by default. I had to create native NTFS symlinks using export CYGWIN="winsymlinks:native"