首页 技术 正文
技术 2022年11月9日
0 收藏 638 点赞 2,787 浏览 1040 个字

最近再Server 2012 + IIS 8 中配置NodeJS 运行环境,具体配置过程就不细说了(随便搜搜一堆),安装完nodejs 和 iisnode 之后,出现一个报错,如下:

The iisnode module is unable to start the node.exe process. Make sure the node.exe executable is available at the location specified in the system.webServer/iisnode/@nodeProcessCommandLine element of web.config. By default node.exe is expected in one of the directories listed in the PATH environment variable

google 了半天,刚开始以为是x86NodeJS安装路径的问题,后来倒腾半天始终不对,后来找到篇文章 https://admin-ahead.com/forum/websitepanel/node-js-error!/

解决方法:在web.config 》system.webServer 节点加上:

<iisnode watchedFiles=”*.js;node_modules\*;routes\*.js;views\*.jade”  nodeProcessCommandLine=”C:\Program Files\node.exe”/>

问题解决,我鸟个去,希望能帮助到后面遇到此问题的童靴,我的web.config 文件如下,供参考:

<configuration>
<system.webServer>
<handlers>
<remove name="nodejs" />
<!-- indicates that the server.js file is a node.js application to be handled by the iisnode module -->
<add name="iisnode" path="server.js" verb="*" modules="iisnode" />
</handlers> <iisnode watchedFiles="*.js;node_modules\*;routes\*.js;views\*.jade" nodeProcessCommandLine="C:\Program Files\node.exe"/>
</system.webServer>
</configuration>
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,105
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,582
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,429
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,200
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,836
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,919