Skip to content

shelljs seems NOT compatible with nexe under CentOS 6.5 #754

@freemine

Description

@freemine

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.

Example ShellJS command to reproduce the error:

Metadata

Metadata

Assignees

Labels

fixBug/defect, or a fix for such a problem

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions