Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Node.js对象函数Number(){[native code]}没有方法';iInteger';_Javascript_Node.js - Fatal编程技术网

Javascript Node.js对象函数Number(){[native code]}没有方法';iInteger';

Javascript Node.js对象函数Number(){[native code]}没有方法';iInteger';,javascript,node.js,Javascript,Node.js,Node.js“Number”类中缺少某些方法和字段。比如说, console.log(Number.isInteger(5)); 给出,“TypeError:Object function Number(){[native code]}没有方法'isInteger'”,而 运行良好 同样地 console.log(Number.MAX_SAFE_INTEGER); 返回“未定义”,而 console.log(Number.MAX_VALUE); 按预期返回“1.7976931348623

Node.js“Number”类中缺少某些方法和字段。比如说,

console.log(Number.isInteger(5));
给出,“TypeError:Object function Number(){[native code]}没有方法'isInteger'”,而

运行良好

同样地

console.log(Number.MAX_SAFE_INTEGER);
返回“未定义”,而

console.log(Number.MAX_VALUE);
按预期返回“1.7976931348623157e+308”


问题是什么?该网络表示,上述所有方法都应该很有效

安装最新版本的Node.js解决了这个问题

您使用的是node.js的哪个版本?node.js——版本返回“v0.10.25”。这太尴尬了,我怎么能用这么旧的版本。但是在Node console(Node console.com/script/code)上运行相同的命令会返回与我的问题中提到的相同的结果。
console.log(Number.MAX_VALUE);