天天看點

webstrom運作nodejs檔案出現CreateProcess failed with error 2

1:首先:确定自己已經安裝好了nodejs

2:然後檢視控制窗裡面報的具體的資訊,我的具體資訊如下:

"D:\軟體\webstorm\WebStorm 2017.2.5\bin\runnerw.exe" D:\node\node.exe "D:\文檔\node test\hello.js"

CreateProcess failed with error 2:

Process finished with exit code 0

運作"D:\軟體\webstorm\WebStorm 2017.2.5\bin\runnerw.exe"和D:\node\node.exe 兩個可執行檔案去執行D:\文檔\node test\hello.js文檔。但是出現了問題:CreateProcess failed with error 2

檔案和webstorm都對着呢,發現node的路徑不對:D:\node\node.exe, 我的是:D:\node\node soft

需要對webstrom進行配置:

打開file-setting-languagesXXXX-nodejsXXXX,設定為自己的nodejs的路徑:

webstrom運作nodejs檔案出現CreateProcess failed with error 2