-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CustomFunctionsMetadataPlugin ERROR in Conflict: Multiple assets emit different content to the same filename #831
Comments
I think this might be because the comparison @ https://github.com/OfficeDev/Office-Addin-Scripts/blob/master/packages/custom-functions-metadata-plugin/src/customfunctionsplugin.ts#L60 is case sensitive but the path.resolve @https://github.com/OfficeDev/Office-Addin-Scripts/blob/master/packages/custom-functions-metadata-plugin/src/customfunctionsplugin.ts#L37 is not. Windows should be case sensitive, also the path separator should be "/". |
Adding support for this, carrying over from my discussion in Office-Add-in-samples. Follow the quick start tutorial to create an add-in as follows: Project type: Excel Custom Functions using a Shared Runtime Then run:
The demo functions work as expected. Next, edit
The above message repeats for all demo functions and for both The final message is this:
One suggestion was to update the custom-funcions-metadata-plugin library (to 1.5.6 as of this writing):
That eliminates the repeating error messages related to the individual functions, leaving only the last one the moment that |
Any progress on this? This is a showstopper for add-in development. |
@MiaofeiWang It would be good to look at this. I think this might even happen if a separate file unrelated to custom functions is modified. When the dev server rebuilds the code, it shouldn't encounter an error. It would be useful to understand why this happens with the plugin. If a custom function definition is added, changed, or deleted, it would be ideal if it could re-register the custom functions with Excel. Not sure if that is feasible now. Currently it is expected that Excel needs to be restarted. |
I tested plain JavaScript as well; the problem is not restricted to TypeScript. |
I ran into this issue just now. It was because I added functions to the functions.ts file after I had started the project. To fix this, I closed out of the Excel and the addin. I rebuilt the add-in using |
I've gone through the comments and in particular that from @b-gonzalez and have run a few tests. I can confirm that there are problems with the following:
It's a little wonky with non-annotated functions as well, but only if they are exported, which is not really a concern. So, in short, as long as functions aren't added or deleted or have their signatures changed, all is joy and happiness. I'm OK with that, as most of the development and debugging is in the functions themselves or the functions they call. Having to occasionally restart Excel because of the above is a minor nuisance by comparison, and frankly this issue has forced me to rearchitect my library in a way that is better decoupled from Excel. I just have to keep in mind that, any time I do any of the above, I have to go through the following (documentation should be updated to reflect this):
The |
Using "custom-functions-metadata-plugin": "^1.5.3".
In webpack watch mode when I modify my functions.ts which is processed by
new CustomFunctionsMetadataPlugin({ input: "./scripts/office-js-addin/src/functions/functions.ts", output: "dist/functions.json" })
I get the error
ERROR in Conflict: Multiple assets emit different content to the same filename dist/functionsTest.json
I do not have anything else writing to dist/functionsTest.json
The text was updated successfully, but these errors were encountered: