【问题标题】:How to correct IISNode HTTP 500 substatus 1002 process request error如何更正 IISNode HTTP 500 子状态 1002 进程请求错误
【发布时间】:2020-01-16 21:47:49
【问题描述】:

尝试使用 IISNode 在 Windows IIS 中托管应用程序时出现以下错误。

iisnode在处理请求时遇到错误。

HRESULT: 0x2
HTTP status: 500
HTTP subStatus: 1002
HTTP reason: Internal Server Error

You are receiving this HTTP 200 response because 
system.webServer/iisnode/@devErrorsEnabled configuration setting is 'true'.

In addition to the log of stdout and stderr of the node.exe process, 
consider using debugging and ETW traces to further diagnose the problem.

The last 64k of the output generated by the node.exe process 
to stderr is shown below:

应用程序抛出未捕获的异常并终止:

错误:EPERM:不允许操作,lstat 'C:\path\to\project'

在 Object.fs.lstatSync (fs.js:893:18)
在 Object.realpathSync (fs.js:1527:21)
在 toRealPath (module.js:132:13)
在 Function.Module._findPath (module.js:180:22)
在 Function.Module._resolveFilename (module.js:470:25)
在 Function.Module._load (module.js:420:25)
在 Module.require (module.js:500:17)
在需要(内部/module.js:20:19)
在对象。 (C:\Program Files\iisnode\interceptor.js:210:1)
在 Module._compile (module.js:573:32)

我已尝试将服务器更改为监听 process.env.PORT,但仍然遇到问题。

还有设置

<rewrite>
  <rules>
    <rule name="sendToNode">
      <match url="/*" />
      <action type="Rewrite" url="server.js" />
    </rule>
  </rules>
</rewrite>

<iisnode 
  nodeProcessCommandLine="&quot;%programfiles%\nodejs\node.exe&quot;"
  interceptor="&quot;%programfiles%\iisnode\interceptor.js&quot;"
/>

web.config 文件中。

【问题讨论】:

    标签: node.js iis npm


    【解决方案1】:

    运行 npm cache clear --force 解决了这个问题。

    【讨论】:

      猜你喜欢
      • 2018-08-03
      • 2015-10-20
      • 1970-01-01
      • 2019-09-13
      • 2017-09-07
      • 2015-08-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多