Skip to main content
Participating Frequently
December 6, 2022
Answered

VS Code ExtendScript dlopen error when trying to run exportToJSXBin.js

  • December 6, 2022
  • 3 replies
  • 4196 views

I'm trying to write some scripts to automate a build process and I can't seem to get exportToJSXBin.js working! It keeps giving me this:

 

node:internal/modules/cjs/loader:1289
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: dlopen(/Users/TCallan/.vscode/extensions/adobe.extendscript-debug-2.0.3/lib/esdebugger-core/mac/esdcorelibinterface.node, 1): no suitable image found.  Did find:
/Users/TCallan/.vscode/extensions/adobe.extendscript-debug-2.0.3/lib/esdebugger-core/mac/esdcorelibinterface.node: mach-o, but wrong architecture
/Users/TCallan/.vscode/extensions/adobe.extendscript-debug-2.0.3/lib/esdebugger-core/mac/esdcorelibinterface.node: mach-o, but wrong architecture

    at Module._extensions..node (node:internal/modules/cjs/loader:1289:18)
    at Module.load (node:internal/modules/cjs/loader:1068:32)
    at Module._load (node:internal/modules/cjs/loader:909:12)
    at Module.require (node:internal/modules/cjs/loader:1092:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at GetCoreLib (/Users/TCallan/.vscode/extensions/adobe.extendscript-debug-2.0.3/public-scripts/exportToJSXBin.js:28:24)
    at initializeCore (/Users/TCallan/.vscode/extensions/adobe.extendscript-debug-2.0.3/public-scripts/exportToJSXBin.js:250:20)
    at Object.<anonymous> (/Users/TCallan/.vscode/extensions/adobe.extendscript-debug-2.0.3/public-scripts/exportToJSXBin.js:273:1)
    at Module._compile (node:internal/modules/cjs/loader:1205:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1259:10) {

  code: 'ERR_DLOPEN_FAILED'
}

 

 

There are a bunch of solutions suggested for similar errors on other tools, I tried a couple and no joy and frankly some of the others look a bit heavy handed and I'm worried I might do something I'll regret. Anyone experienced this with VS Code ExtendScript?

    This topic has been closed for replies.
    Correct answer sberic

    @tommyc71769282  What is the specific command that you're using to start NodeJS? Additionally, how did you install NodeJS? Can you confirm that you have a Universal build of NodeJS installed or have otherwise installed the Intel version?


    @tommyc71769282 Could you also try using the file command on your Node executable?

     

    On my machine (M1 Max) I installed Node with NVM so I had to do the following:

    # cd ~/.nvm/versions/node/v16.13.0/bin
    # file node

    And that resulted in the following output:

    # node: Mach-O 64-bit executable x86_64

    This shows that my v16.13.0 installation of NodeJS is the Intel-only build. Universal binaries would result in something like this:

    # node: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64:Mach-O 64-bit executable arm64]
    # node (for architecture x86_64):	Mach-O 64-bit executable x86_64
    # node (for architecture arm64):	Mach-O 64-bit executable arm64

     Can you please try running that file command on your node binary to see what version(s) it was compiled for?

    3 replies

    erinferinferinf
    Adobe Employee
    Adobe Employee
    December 15, 2022

    You have to use VSCode running in Rosetta mode...

     

    But @sberic can weigh in...

    Participating Frequently
    December 15, 2022

    I am running VS Code in Rosetta mode. It works fine in general but the exportToJSXBin.js script generates this error when I try to run it from Terminal.

    Harbs.
    Legend
    December 15, 2022

    The shell script would need to be run in Rosetta too.

    BarlaeDC
    Community Expert
    Community Expert
    December 15, 2022

    Hey, are you on an M1 chip?

    Participating Frequently
    December 15, 2022

    Hi Malcolm. It's Tommy. Long time! How are you?

    I'm on a MacBook Pro M1, Big Sur (although I do also have another MacBook on Monterey).

    BarlaeDC
    Community Expert
    Community Expert
    December 15, 2022

    Hey, Doing alright, thought it was you but didn't want to presume, I was going to point you in the direction of @Harbs. answer, so make sure and give him the kudos.

    Harbs.
    Legend
    December 15, 2022

    Is this on Apple Silicon?

    Participating Frequently
    December 15, 2022

    Yes, MacBook Pro M1, Big Sur (although I do also have another MacBook on Monterey).