hyperbrew / vite-cep-plugin

A Vite plugin to build Adobe CEP Extension Panels
MIT License
17 stars 17 forks source link

yarn zxp - 'require' external node modules results in: Error - Symbolic links points to an invalid location. #19

Closed PerryDesign closed 1 year ago

PerryDesign commented 1 year ago

When attempting to build a zxp on an M1 Mac where I am including img-clipboard as an external node module via const { copyImg } = require('img-clipboard');, the build fails with this in the console:

 error during build:
Error: Command failed: ./ZXPSignCmd -sign "/Users/dannyperry/Desktop/plugin_play_tools/copy-pasta/dist/cep" "/Users/dannyperry/Desktop/plugin_play_tools/copy-pasta/dist/zxp/com.pluginplay.copy-pasta.zxp" "/Users/dannyperry/Desktop/plugin_play_tools/copy-pasta/node_modules/vite-cep-plugin/lib/.tmp/com.pluginplay.copy-pasta-cert  " mypassword -tsa http://timestamp.digicert.com/
Error - Symbolic links points to an invalid location. 

Deleting this require statement results in a successful build. Including the module in cep.config under installModules with the require statement in the codebase results in the same failure. Including the module in cep.config under installModules and removing the require statement from the codebase results in the same error. I still have not attempted with other external node modules.

justintaylor-dev commented 1 year ago

Thanks for brining this up.

I can recreate this issue on my end with Mac, Windows builds successfully. Will look into these sorts of packages...

justintaylor-dev commented 1 year ago

@PerryDesign that module relies on Symlinks, which need to be dereferenced on Mac.

If you run yarn add vite-cep-plugin to update to 1.1.0 this issue should be resolved.

PerryDesign commented 1 year ago

@justintaylor-dev this works great. Thanks for the fix 🙌

justintaylor-dev commented 1 year ago

Awesome