-
Notifications
You must be signed in to change notification settings - Fork 739
Description
Node version (or tell us if you're using electron or some other framework):
node: v8.2.1
npm: 5.3.0
nexe: 1.1.3
ShellJS version (the most recent version/Github branch you see the bug on):
shelljs@0.7.8 (npm install shelljs)
Operating system:
CentOS 6.5
uname -a: Linux localhost.localdomain 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Description of the bug:
gcc --version: gcc (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)
using nexe to build a binary from js file which require('shelljs'), the binary could be built.
but when the binary is run, it fails with:
module.js:487
throw err;
^
Error: Cannot find module './src/cat'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at s ([eval]:1:114)
at [eval]:1:305
at [eval]:3312:3
at Array.forEach (native)
at Object.16../commands ([eval]:3311:23)
at s ([eval]:1:254)
test.js as simple as such:
let shelljs = require('shelljs');
console.log('d');
but, when I run: node ./test.js, it runs smoothly with no error.
but, when i run: ./node_modules/shelljs/bin/shjs ./test, it runs correctly.