sweet-js / sweet-core

Sweeten your JavaScript.
https://www.sweetjs.org
BSD 2-Clause "Simplified" License
4.58k stars 208 forks source link

sjs binary throws module errors #699

Closed Skrylar closed 7 years ago

Skrylar commented 7 years ago

Versions: Linux Arch, 64-bit, NPM v4.5, NodeJS v7.7.3. Expectation: Running sjs should run the compiler. Result: A module error is thrown.

module.js:472
    throw err;
    ^

Error: Cannot find module 'sweet-cli/bin/sjs'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/lib/node_modules/sweet.js/sjs.js:2:1)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)

It appears as though the package has been moved to @sweetjs without updating the wrapper scripts. If you manually hunt down /usr/lib/node_modules/sweet.js/node_modules/@sweet-js/cli/bin/sjs.js it will work just fine. All pointers to this file seem to point to a nonexistent module, however.

Recording: https://asciinema.org/a/7zwhneyihtgzhzd1e1b9ljdjq**

disnet commented 7 years ago

Fixed at https://github.com/sweet-js/sweet-shell/pull/1

Sorry about that, the re-org was a little bumpy.

Thanks for reporting!