在NodeJS应用程序中使用require的快速错误(Raspberry Pi3) [英] Express error with require in NodeJS app (Raspberry Pi3)
问题描述
大家好,
我在尝试在raspjs网络服务器应用程序中使用需求("快速")时遇到问题,用于覆盆子pi3上的Windows 10 IoT。我首先在我自己的代码中注意到,一旦我导入express(没有任何进一步使用express),比如
这个:
var express = require('express');
然后我收到此异常:
第234行第9行的未处理异常在未知脚本代码(1)
0x800a1624 - JavaScript运行时错误:Reflect.apply:参数不是数组或类似数组的对象
然后我尝试使用提供的Visual Studio示例,完全按照此处所述:
https://developer.microsoft.com/en-us/windows/iot/samples / expressnodejs
这给出了完全相同的错误。
它打破的代码部分(在模块中的某个地方):
var currentStackTrace;
函数ensureStackTrace(){
if(!currentStackTrace){
currentStackTrace = parseStack(
Reflect_apply(oldStackDesc.get,e)||'',//调用已保存的旧getter
skipDepth,startFuncName);
}
返回currentStackTrace;
}
有没有人知道可能导致这种情况的原因以及如何解决这个问题?提前致谢!
问候,
Guus
这是同一个问题吗?
https://github.com/ms-iot/ntvsiot/issues/126
Hi everyone,
I'm encountering a problem when trying to use require("express") in a nodejs webserver app for windows 10 IoT on raspberry pi3. I first noticed it in my own bit of code that as soon as I import express (without any further usage of express), like this:
var express = require('express');
then I'm getting this exception:
Unhandled exception at line 234, column 9 in Unknown script code (1)
0x800a1624 - JavaScript runtime error: Reflect.apply: argument is not an array or array-like object
Then I tried it with the Visual Studio sample provided, exactly as described here:
https://developer.microsoft.com/en-us/windows/iot/samples/expressnodejs
Which gave the exact same error.
The code part its breaking on (which is somewhere in a module):
var currentStackTrace; function ensureStackTrace() { if (!currentStackTrace) { currentStackTrace = parseStack( Reflect_apply(oldStackDesc.get, e) || '', // Call saved old getter skipDepth, startFuncName); } return currentStackTrace; }
Does anybody have an idea what could be causing this and how I can fix it? Thanks in advance!
Regards,
Guus
Is this the same issue? https://github.com/ms-iot/ntvsiot/issues/126
这篇关于在NodeJS应用程序中使用require的快速错误(Raspberry Pi3)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!