Node.js application does not start: Internal Server Error

Created:

2017-01-27 17:56:03 UTC

Modified:

2017-08-19 03:09:11 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Node.js application does not start: Internal Server Error

Applicable to:

  • Plesk Onyx for Windows

Note: This article has the reference to the issue with the fix available:

  • #PPPM-5651 "When Node.js was installed in a non-standard path, NPM install failed due to a missing permission."
    Fixed in:
Please consider updating your server:

Symptoms

Node.js application fails with the following error:

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

Cause

Incorrect C:\Program files and C:\Program Files (x86) permissions for psacln user.

Babel-register appears to be trying to write the local profile.

This is Plesk bug with ID #PPPM-5651 that was fixed in Plesk Onyx 17.5.3

Resolution

As a workaround:

1. Fix access permission on C:\Program Files and C:\Program Files (x86) directories for "psacln" group. Set values Read attributes in Properties > Security > Advanced > psacln > edit > Show advanced permissions and Applies to > This folder only .

2. Create a backup of web.conf file ( C:\Inetpub\vhosts\example.com\httpdocs\web.config )

3. Add the following part to the C:\Inetpub\vhosts\example.com\httpdocs\web.config :

<configuration>
<appSettings>
<add key="BABEL_CACHE_PATH" value="C:\Babel\cache.json" />
</appSettings>
<system.webServer>
<iisnode promoteServerVars="LOGON_USER" />
<handlers>
<add name="iisnode" path="index.js" verb="*" modules="iisnode" />
</handlers>
<rewrite>
<rules>
<rule name="test">
<match url="/*" />
<action type="Rewrite" url="index.js" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

4. Press NPM install button ( Plesk > Subscriptions > example.com > Node.js > NPM install )

Have more questions? Submit a request
Please sign in to leave a comment.