extendscriptr: global installation is not working because of hardcoded path of prototypes

Hi, I’ve installed (apparently successfully, few warnings about unmet dependencies) extendscriptr, but when I try to run a simple:

$ extendscriptr --script ./test.js --output ./test_enc.js

I get this error:

Running extendscriptr with following options:
--script: ./test.js
--output: ./test_enc.js
--target: undefined (optional)
fs.js:584
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open './node_modules/extendscript.prototypes/lib/extendscript.prototypes.js'
    at Error (native)
    at Object.fs.openSync (fs.js:584:18)
    at Object.fs.readFileSync (fs.js:431:33)
    at Object.<anonymous> (/usr/local/lib/node_modules/extendscriptr/index.js:27:29)
    at Module._compile (module.js:397:26)
    at Object.Module._extensions..js (module.js:404:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:429:10)
    at startup (node.js:139:18)

Any idea about the reason why this occurs? Thank you!

Davide

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 1
  • Comments: 20 (15 by maintainers)

Commits related to this issue

Most upvoted comments

and in vacations. Sorry about that.

Yeah you should be sorry that you had a vacation. 😉

Hello, here is the error that I keep getting after having installed node-latest (via nvm), and using global extendscriptr:

$ which extendscriptr
/Users/davidebarranca/.nvm/versions/node/v6.3.0/bin/extendscriptr
$ extendscriptr --script ./in.js --output ./out.js
Running extendscriptr with following options:
--script: ./in.js
--output: ./out.js
--target: undefined (optional)
fs.js:640
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open './node_modules/extendscript.prototypes/lib/extendscript.prototypes.js'
    at Error (native)
    at Object.fs.openSync (fs.js:640:18)
    at Object.fs.readFileSync (fs.js:508:33)
    at Object.<anonymous> (/Users/davidebarranca/.nvm/versions/node/v6.3.0/lib/node_modules/extendscriptr/index.js:27:29)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.runMain (module.js:575:10)
$ node --version
v6.3.0
$ npm --version
3.10.3

The local version works as expected, though.

@fabiantheblind you asked me whether the node_modules folders are flattened or nested, this is a screenshot: folders (hopefully I’m looking in the right folder…!) Thank you!