-
Notifications
You must be signed in to change notification settings - Fork 744
FS Real Path error thrown when requiring shelljs #521
Copy link
Copy link
Closed
Labels
Description
Node version (or tell us if you're using electron or some other framework):
Node - v4.5.0
NPM - 2.15.9
ShellJS version (the most recent version/Github branch you see the bug on):
^0.7.4
Operating system:
Mac OSX El Capitan
Description of the bug:
I have a post install script that requires shelljs - I cloned the repository and then run npm install. The script fails when I require shelljs with an issue about node's global fs. When I remove the require to shelljs, it does not throw an error.
Example ShellJS command to reproduce the error:
#! /usr/bin/env node
/*jshint esversion: 6, node: true */
"use strict";
const shell = require("shelljs"); throw err;
^
Error: Cannot find module 'fs.realpath'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)`
Reactions are currently unavailable