vigetlabs / blendid

A delicious blend of gulp tasks combined into a configurable asset pipeline and static site builder
MIT License
4.97k stars 682 forks source link

Document tmp path options #415

Open light-flight opened 7 years ago

light-flight commented 7 years ago

Crashes on task 'replaceFiles' and 'build' on the line fs.renameSync Error: EXDEV: cross-device link not permitted, rename '/tmp/gulp-starter' -> '/home/PATH_TO_APP/public' http://stackoverflow.com/a/21072354

greypants commented 7 years ago

Thanks for reporting. What's your setup? I believe I've heard of this happening sometimes with Vagrant setups, and it has to do with os.tmpdir() being in an inaccessible location. In your path-config.json, you can add a tmp: 'some/other/path property to specify a different temp directory to build to. Right now, the path you specify will be relative to your project root/wherever you started the process... though I'm starting to think I should just require an absolute path.

Here's where that logic is happening: https://github.com/vigetlabs/gulp-starter/blob/blendid/gulpfile.js/tasks/production.js#L13-L15

This is a good reminder that I need to document this!

greypants commented 7 years ago

Did changing the tmp directory fix your issue?

light-flight commented 7 years ago

Sorry for silence, mate. i've tried, but it didn't make any changes. What about setup.. i'm on ubuntu

light-flight commented 7 years ago

Huh, there is stupid mistake

"tmp": "some/other/path"

Not tmp but temp

now all is up and running

kevnk commented 7 years ago

This happened to me on a vagrant setup. Adding this to my path-config.json fixed it:

{
  ...
  "temp": "../temp",
  ...
}
Seminioni commented 7 years ago

Previous comment helped me too. I am on W10, Bash through Windows Linux Subsystem.

devinle commented 7 years ago

I implemented this change, and I'm using DeployBot. I'm still seeing the following error. Any ideas?

output [16:21:13] Starting 'replaceFiles'... output [16:21:13] 'replaceFiles' errored after 3.37 ms output [16:21:13] Error: EXDEV: cross-device link not permitted, rename '/temp' -> '/source/public' output at Error (native) output at Object.fs.renameSync (fs.js:809:18) output at Gulp.replaceFiles (/source/node_modules/blendid/gulpfile.js/tasks/replace-files.js:10:6) output at module.exports (/source/node_modules/orchestrator/lib/runTask.js:34:7) output at Gulp.Orchestrator._runTask (/source/node_modules/orchestrator/index.js:273:3) output at Gulp.Orchestrator._runStep (/source/node_modules/orchestrator/index.js:214:10) output at Gulp.Orchestrator.start (/source/node_modules/orchestrator/index.js:134:8) output at /source/node_modules/gulp-sequence/index.js:68:12 output at apply (/source/node_modules/thunks/thunks.js:354:38) output at tryRun (/source/node_modules/thunks/thunks.js:224:19) output [16:21:13] 'build' errored after 1.62 s

kevnk commented 7 years ago

@devinle can you post your full path-config.json?

devinle commented 7 years ago

Hi @kevnk

Thanks for the quick response. I actually just got this working by using ./ instead of ../ Seems to be doing the trick now!

{ ... "temp": "./temp", ... }