jailed
jailed copied to clipboard
TypeError: Cannot read property 'name' of undefined
Hi I am relative new to node and trying out how to use jailed.
So I have started with the basic functionality with this script
//npm install jailed var jailed = require('jailed');
var code = "application.remote.test('Hello!! Welcome to jailed');";
var api = { test: function(config){ console.log(config); } }
var plugin = new jailed.DynamicPlugin(code, api);
But it is giving me a weird error
(process.release.name.search(/node|io.js/) !== -1)); ^ TypeError: Cannot read property 'name' of undefined at /Users/anandk/delete/jailed/node_modules/jailed/lib/jailed.js:49:35 at isNode (/Users/anandk/delete/jailed/node_modules/jailed/lib/jailed.js:42:9) at Object.
(/Users/anandk/delete/jailed/node_modules/jailed/lib/jailed.js:46:2) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at Object. (/Users/anandk/delete/jailed/jail.js:2:14)
is there some problem with the latest release?
I guess the issue was because I was using older version of node. I have upgraded it and its working now!!
I have this issue when I run on web (via Electron)