Gulp: Symlinked gulpfile.js works in a wrong directory

Created on 7 Oct 2014  路  5Comments  路  Source: gulpjs/gulp

Aftermath of https://github.com/gulpjs/gulp/issues/704

Gulp executes tasks of a symlinked gulpfile.js in a context of a directory where the original file is.

$ ln -s ~/docs/beta/gulpfile.js gulpfile.js
$ gulp sass
[02:37:01] Working directory changed to ~/docs/beta
[02:37:02] Using gulpfile ~/docs/beta/gulpfile.js
[02:37:02] Starting 'sass'...
[02:37:02] Finished 'sass' after 1.52 ms

Most helpful comment

For what it's worth, I'm encountering this problem right now and am having to do a bit of hackery to get it to work. In particular, we have this lovely environment that puts Bazel in Docker containers, and I have to manually symlink the node_module directories into some other test directory so that Gulp doesn't panic. :-(
Not sure what the solution is, but wanted to chime in that this is still an issue. Sorry I can't be of more help.

All 5 comments

@tkellen

Ah, of course. Try npm update again.

closing due to @tkellen's linked resolution and no activity/confirmation from @borodean

For what it's worth, I'm encountering this problem right now and am having to do a bit of hackery to get it to work. In particular, we have this lovely environment that puts Bazel in Docker containers, and I have to manually symlink the node_module directories into some other test directory so that Gulp doesn't panic. :-(
Not sure what the solution is, but wanted to chime in that this is still an issue. Sorry I can't be of more help.

Was this page helpful?
0 / 5 - 0 ratings