question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Symlinked gulpfile.js works in a wrong directory

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
btellescommented, Mar 1, 2016

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.

1reaction
tkellencommented, Oct 8, 2014

Ah, of course. Try npm update again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

symlink() - gulp.js
If isDirectory() returns false then a 'file' link is created, otherwise a 'junction' or 'dir' link is created depending on the value of...
Read more >
Gulp watch task triggers too often because of symlink in folder
I have a gulp watch that should run when .pcss files get saved and then run postcss to generate .css files in the...
Read more >
gulp@1 - gulp v1 task | Microsoft Learn
Run the gulp Node.js streaming task-based build system. ... Path to an alternative gulp.js , relative to the working directory.
Read more >
The magic behind npm link - Medium
When you run npm link in a module's root directory, npm creates a symbolic link from your “global node_modules” directory to the local...
Read more >
glob - npm
"Globs" are the patterns you type when you do stuff like ls *.js on the command line, ... It does not crawl symlinked...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found