runegan / jsxbin

Convert jsx ExtendScript files into jsxbin files using ExtendScript Toolkit
MIT License
87 stars 21 forks source link

Install fails on Windows 10 #17

Closed Inventsable closed 3 years ago

Inventsable commented 4 years ago

Hello. I've installed this previously with no issue back when it was still using the ESTK, and recently came to revisit it but get an error when running npm install jsxbin:

> jsxbin@2.0.1 postinstall C:\Users\TRSch\OneDrive\Documents\Dev\NPMpackages\bombino-commands\node_modules\jsxbin
> tar -xzf esdebugger-core.tar.gz

esdebugger-core/mac/Frameworks/esdcore.framework/Resources: Can't create '\\\\?\\C:\\Users\\TRSch\\OneDrive\\Documents\\Dev\\NPMpackages\\bombino-commands\\node_modules\\jsxbin\\esdebugger-core\\mac\\Frameworks\\esdcore.framework\\Resources'
esdebugger-core/mac/Frameworks/esdcore.framework/esdcore: Can't create '\\\\?\\C:\\Users\\TRSch\\OneDrive\\Documents\\Dev\\NPMpackages\\bombino-commands\\node_modules\\jsxbin\\esdebugger-core\\mac\\Frameworks\\esdcore.framework\\esdcore'
esdebugger-core/mac/Frameworks/esdcore.framework/Versions/Current: Can't create '\\\\?\\C:\\Users\\TRSch\\OneDrive\\Documents\\Dev\\NPMpackages\\bombino-commands\\node_modules\\jsxbin\\esdebugger-core\\mac\\Frameworks\\esdcore.framework\\Versions\\Current'
esdebugger-core/mac/Frameworks/esdcore.framework/Versions/A/Resources/adobe_caps.framework/Resources: Can't create '\\\\?\\C:\\Users\\TRSch\\OneDrive\\Documents\\Dev\\NPMpackages\\bombino-commands\\node_modules\\jsxbin\\esdebugger-core\\mac\\Frameworks\\esdcore.framework\\Versions\\A\\Resources\\adobe_caps.framework\\Resources'
esdebugger-core/mac/Frameworks/esdcore.framework/Versions/A/Resources/adobe_caps.framework/adobe_caps: Can't create '\\\\?\\C:\\Users\\TRSch\\OneDrive\\Documents\\Dev\\NPMpackages\\bombino-commands\\node_modules\\jsxbin\\esdebugger-core\\mac\\Frameworks\\esdcore.framework\\Versions\\A\\Resources\\adobe_caps.framework\\adobe_caps'
esdebugger-core/mac/Frameworks/esdcore.framework/Versions/A/Resources/adobe_caps.framework/Versions/Current: Can't create '\\\\?\\C:\\Users\\TRSch\\OneDrive\\Documents\\Dev\\NPMpackages\\bombino-commands\\node_modules\\jsxbin\\esdebugger-core\\mac\\Frameworks\\esdcore.framework\\Versions\\A\\Resources\\adobe_caps.framework\\Versions\\Current'
tar: Error exit delayed from previous errors.
npm WARN bombino-commands@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! jsxbin@2.0.1 postinstall: `tar -xzf esdebugger-core.tar.gz`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the jsxbin@2.0.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\TRSch\AppData\Roaming\npm-cache\_logs\2019-11-15T01_18_00_267Z-debug.log

Noticeably looks like it's trying to grab or do something with a Mac file structure and isn't reading my OS prior to know I'm using Windows. Any workaround to this?

mzuzek commented 4 years ago

Just hit the same problem - tar fails npm on Win10 (both cmd and PS):

PS D:\jsxbin.local> tar -xzf esdebugger-core.tar.gz

fails with:

esdebugger-core/mac/Frameworks/esdcore.framework/Resources: Can't create '\\\\?\\D:\\jsxbin.local\\esdebugger-core\\mac\\Frameworks\\esdcore.framework\\Resources'
esdebugger-core/mac/Frameworks/esdcore.framework/esdcore: Can't create '\\\\?\\D:\\jsxbin.local\\esdebugger-core\\mac\\Frameworks\\esdcore.framework\\esdcore'
esdebugger-core/mac/Frameworks/esdcore.framework/Versions/Current: Can't create '\\\\?\\D:\\jsxbin.local\\esdebugger-core\\mac\\Frameworks\\esdcore.framework\\Versions\\Current'
esdebugger-core/mac/Frameworks/esdcore.framework/Versions/A/Resources/adobe_caps.framework/Resources: Can't create '\\\\?\\D:\\jsxbin.local\\esdebugger-core\\mac\\Frameworks\\esdcore.framework\\Versions\\A\\Resources\\adobe_caps.framework\\Resources'
esdebugger-core/mac/Frameworks/esdcore.framework/Versions/A/Resources/adobe_caps.framework/adobe_caps: Can't create '\\\\?\\D:\\jsxbin.local\\esdebugger-core\\mac\\Frameworks\\esdcore.framework\\Versions\\A\\Resources\\adobe_caps.framework\\adobe_caps'
esdebugger-core/mac/Frameworks/esdcore.framework/Versions/A/Resources/adobe_caps.framework/Versions/Current: Can't create '\\\\?\\D:\\jsxbin.local\\esdebugger-core\\mac\\Frameworks\\esdcore.framework\\Versions\\A\\Resources\\adobe_caps.framework\\Versions\\Current'
tar.exe: Error exit delayed from previous errors.

One workaround would be to:

  1. clone repo locally to jsxbin.local
  2. disable tar in package.json:29 setting "postinstall": ""
  3. manually unpack esdebugger-core.tar.gz to replace it with esdebugger-core folder.
  4. Install from local folder: npm install jsxbin.local
mzuzek commented 4 years ago

Problem cause

esdebugger-core.tar.gz contains folders named with colon (like Resources: or esdcore:, see errors in my previous comment) which are treated specially on Windows, see https://superuser.com/questions/730408/how-to-extract-tar-file-on-windows-when-the-filenames-include-a-colon.

Suggested solutions

vj-ome commented 4 years ago

I've got the same problem. The tar file contains the symlinks for the mac directories, but the windows tar command does not support this symlink handling.

Suggested solutions:

sammarks commented 3 years ago

Another workaround is to use something like Cygwin to run the installation instead of running it in Windows by itself. That's what I was using when developing the original PR.

And yep it looks like @MikolajZuzek has the best solution. We just need to create a new archive that's windows-specific and update the postinstall scripts to call the proper one.

runegan commented 3 years ago

Fixed in #22