profile
viewpoint

Ask questionstest: “EXDEV: cross-device link not permitted"

Problem

Got the critical error "EXDEV: cross-device link not permitted" on npm run test .

Repro

  • mount /tmp in a different mountpoint than the working(testing) directory.
  • npm run test .

Cause

Using fs.rename for moving files has some limitation.

One of these is that does not handle moving files between different mounted filesystems. see: https://stackoverflow.com/questions/43206198/what-does-the-exdev-cross-device-link-not-permitted-error-mean .

Solution

Replace fs.rename with copy and then remove of the source file.

Proposition

As I'm currently working on a PR addressing #312 I will include this bugfix in the same PR.

google/gts

Answer questions ofrobots

This should have been fixed by 0f70ffc6.

useful!

Related questions

No questions were found.
source:https://uonfu.com/
Github User Rank List