About xlsx.extendscript.js #2629

Closed
opened 2022-03-27 13:56:30 +00:00 by jlzyyds · 7 comments
jlzyyds commented 2022-03-27 13:56:30 +00:00 (Migrated from github.com)

I include the file "xlsx.extendscript.js" in a After effects script file (.jsx), when executing the script will encounter an error:

code:
1648389245861

Syntax Error:
Unterminated string constant <= line:5620 column:9 file: /Users/xxx/aeproject/script/smscript/node_modules/xlsx/dist/xlsx.extendscript.js.

1648388326137

The After Effects version is 2020 for MAC
VSCode version is 1.65.2

Thank you for your help !

I include the file "xlsx.extendscript.js" in a After effects script file (.jsx), when executing the script will encounter an error: code: ![1648389245861](https://user-images.githubusercontent.com/99283952/160284927-83ae307a-2e5b-4ec8-ba17-5fb8bb4ca5d0.jpg) Syntax Error: Unterminated string constant <= line:5620 column:9 file: /Users/xxx/aeproject/script/smscript/node_modules/xlsx/dist/xlsx.extendscript.js. ![1648388326137](https://user-images.githubusercontent.com/99283952/160284554-bf3cc447-6f59-4e9d-860a-6901ded30c53.jpg) The After Effects version is 2020 for MAC VSCode version is 1.65.2 Thank you for your help !
SheetJSDev commented 2022-03-27 17:12:51 +00:00 (Migrated from github.com)

Does the same issue show up when using the ExtendScript toolkit directly (https://github.com/Adobe-CEP/CEP-Resources/tree/master/ExtendScript-Toolkit) ?

Does the same issue show up when using the ExtendScript toolkit directly (https://github.com/Adobe-CEP/CEP-Resources/tree/master/ExtendScript-Toolkit) ?
jlzyyds commented 2022-03-27 17:37:57 +00:00 (Migrated from github.com)

Does the same issue show up when using the ExtendScript toolkit directly (https://github.com/Adobe-CEP/CEP-Resources/tree/master/ExtendScript-Toolkit) ?

The tool is only available in 32-bit version and is officially no longer supported or maintained.
That ExtendScript Toolkit will not run on macOS 10.15 Catalina or above, My Mac OS version is 12.2.1.
Most people currently use the VSCode ExtendScript Debugger plugin.

> Does the same issue show up when using the ExtendScript toolkit directly (https://github.com/Adobe-CEP/CEP-Resources/tree/master/ExtendScript-Toolkit) ? The tool is only available in 32-bit version and is officially no longer supported or maintained. That ExtendScript Toolkit will not run on macOS 10.15 Catalina or above, My Mac OS version is 12.2.1. Most people currently use the VSCode ExtendScript Debugger plugin.
SheetJSDev commented 2022-03-27 18:28:20 +00:00 (Migrated from github.com)

It may be expecting a UTF8 BOM, can you try adding it in? In the shell:

cat <(printf '\xEF\xBB\xBF') node_modules/xlsx/dist/xlsx.extendscript.js > xlsx.extendscript.js

This will create a new file that you can import.

It may be expecting a UTF8 BOM, can you try adding it in? In the shell: ```bash cat <(printf '\xEF\xBB\xBF') node_modules/xlsx/dist/xlsx.extendscript.js > xlsx.extendscript.js ``` This will create a new file that you can import.
jlzyyds commented 2022-03-27 18:47:50 +00:00 (Migrated from github.com)

Thanks for your reply.
The number of error lines changed after UTF8 BOM was added.
1648406825261

Thanks for your reply. The number of error lines changed after UTF8 BOM was added. ![1648406825261](https://user-images.githubusercontent.com/99283952/160296047-63c8dd73-1945-4b6f-a4f5-84db5cb3d86f.jpg)
SheetJSDev commented 2022-03-27 18:49:18 +00:00 (Migrated from github.com)

ESBuild bug https://github.com/evanw/esbuild/issues/2136 , in the meanwhile we'll refactor that line

ESBuild bug https://github.com/evanw/esbuild/issues/2136 , in the meanwhile we'll refactor that line
SheetJSDev commented 2022-03-27 19:08:13 +00:00 (Migrated from github.com)

@jlzyyds unfortunately esbuild is not going to fix the bug, so the line was reworked and the updated build appears to work correctly back to ESTK 3.5. Please test against https://raw.githubusercontent.com/SheetJS/sheetjs/master/dist/xlsx.extendscript.js . Download with curl:

curl -LO https://raw.githubusercontent.com/SheetJS/sheetjs/master/dist/xlsx.extendscript.js
@jlzyyds unfortunately esbuild is not going to fix the bug, so the line was reworked and the updated build appears to work correctly back to ESTK 3.5. Please test against https://raw.githubusercontent.com/SheetJS/sheetjs/master/dist/xlsx.extendscript.js . Download with curl: ```bash curl -LO https://raw.githubusercontent.com/SheetJS/sheetjs/master/dist/xlsx.extendscript.js ```
jlzyyds commented 2022-03-27 20:46:55 +00:00 (Migrated from github.com)

@SheetJSDev appreciate your help!
it works fine now.

Thank you very much.

@SheetJSDev appreciate your help! it works fine now. Thank you very much.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sheetjs/sheetjs#2629
No description provided.