Как исправить ошибку запроса процесса IISNode HTTP 500 substus 1002 - PullRequest
0 голосов
/ 10 июля 2019

При попытке разместить приложение в 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)
в модуле.require (module.js: 500: 17)
at require (internal / module.js: 20: 19)
at Object.(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.

1 Ответ

0 голосов
/ 10 июля 2019

Запуск npm clear cache --force решил эту проблему.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...