norahiko / runsync Goto Github PK
View Code? Open in Web Editor NEWPolyfill of spawnSync and execSync for Node-0.10.x
License: MIT License
Polyfill of spawnSync and execSync for Node-0.10.x
License: MIT License
in node
0.11.14
, I get the following error:
module.js:355
Module._extensions[extension](this, filename);
^
Error: Module did not self-register.
at Error (native)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (./node_modules/runsync/index.js:32:15)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
It looks like this polyfill isn't actually checking for the existence of execFileSync
etc on child_process
.
sed -i 's/\r/\n/g' /path/to/some/file
This shell command works in bash terminal, when i run via runsync, it throws error.
runsync command,
var sedArgs = [
"-i",
"'s/\r/\n/g'",
path.join(theFolder, "finalreport.html")
]
````.
It looks like, when there are escape characters - \r, \n in the sed pattern, it throws error.
When i give a simpler pattern like, `s/abc/def/g`, it works without any complaints.
See https://travis-ci.org/ljharb/es7-shim/jobs/46043274 for failure output.
var tmpdir = require("os").tmpdir();
^
TypeError: Object #<Object> has no method 'tmpdir'
at Object.<anonymous> (/home/travis/build/ljharb/es7-shim/node_modules/runsync/index.js:11:28)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (/home/travis/build/ljharb/es7-shim/test/util/runner.js:1:74)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
It'd be ideal if this module could be used on as many versions of node as possible. Is there any way that could happen, at least for node 0.8?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.