OfficeDev / generator-office

Yeoman generator for building Microsoft Office related projects.
https://www.npmjs.com/package/generator-office
MIT License
838 stars 208 forks source link

cross-device link error #831

Open mlmaria opened 4 months ago

mlmaria commented 4 months ago

Expected behavior

I wanted to run the add-in tutorial for Word to create the "Hello World" functionality.

Current behavior

Every time I try to usenpm run, I get this error Error: EXDEV: cross-device link not permitted, link 'manifest.xml' -> '/Users/mariiali/Library/Containers/com.microsoft.Word/Data/Documents/wef/a2e86463-2178-4fd6-b0b6-815d208cb7e1.manifest.xml'despite not having anything in the wef folder.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. yo office
  2. Select the Project Type for "Office Add-in Task Pane project using React framework " using Typescript and for MS Word
  3. npm start

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

Failure Logs

image
LuyiH commented 3 months ago

@millerds can you help with this question? Thanks

millerds commented 3 months ago

I don't have expertise in Mac environments and that error is specific to Mac.

Abhijit-Revamp commented 1 week ago

This is happening because the script is trying to rename a file across "device" (partition) boundaries. this is across linux / macOS etc. if your adding root folder is on different partition than the /Users partition.

@millerds @LuyiH --> It seems the code is trying to move the manifest file (based on the guid). Instead use "mv" rather than "move". Or use first copy file target and then rename.

More details: https://stackoverflow.com/questions/43206198/what-does-the-exdev-cross-device-link-not-permitted-error-mean https://stackoverflow.com/questions/37153666/error-exdev-cross-device-link-not-permitted-rename-tmp-on-ubuntu-16-04-lts/44146825#44146825

Abhijit-Revamp commented 1 week ago

@millerds @LuyiH

on further investigation, the issue lies in the function "registerAddIn" in file

https://github.com/OfficeDev/Office-Addin-Scripts/blob/master/packages/office-addin-dev-settings/src/dev-settings-mac.ts

In this function, there is a call to "ensureLinkSync" which throws up.

I don't think this issue will be ever solved.