Error running node app in WebMatrix

前端 未结 3 986
北恋
北恋 2020-12-10 17:11

I installed WebMatrix and followed these instructions to install IIS 7 on my Windows 7 machine.

When I click \'Run\' to run my express node app, the browser pops up

相关标签:
3条回答
  • 2020-12-10 17:55

    with node.js(64-bit), try placing this at the bottom of web.config

    <iisnode watchedFiles="*.js;node_modules\*;routes\*.js;views\*.jade" 
    nodeProcessCommandLine="\program files\nodejs\node.exe"/>
    
    0 讨论(0)
  • 2020-12-10 18:01

    Instead of installing the 32-bit version, you can create a symbolic link from the 32-bit path to the 64-bit one.

    At the cmd.exe prompt:

    mklink /D "C:\Program Files (x86)\nodejs" "C:\Program Files\nodejs"
    

    Surprising that this still isn't fixed and the web.config setting seems to be ignored.

    0 讨论(0)
  • 2020-12-10 18:12

    This is a common problem if you've installed the x64 version of node from the website. Currently IISNode is set up to read node.exe from the x32 path. You can either change nodeProcessCommandLine to use the full path to node.exe on your box, or install the 32 bit node install. We're working on fixing this so both 32/64 bit will work out of the box. Let me know if this turns out to not be the problem :)

    0 讨论(0)
提交回复
热议问题