我在哪里可以findnode.js解释器
在WebStorm中运行karma.conf
,我需要在popup窗口中configuration它,然后input“node.js解释器的path”。
(由于某种原因,这个信息在重新启动后消失了)
问题:
- 什么是所需文件的path?
- Mac / Linux / Windows默认的节点解释器在哪里?
(我在OS X上)
一般来说,在OSX和Linux上,你可以find任何程序与which program
。 在你的情况下,input
which node
在terminal。
在Windows命令提示符下
where node
在OSX上: /usr/local/bin/node
以及我自己得到它,但想分享的答案,因为我无法find它在谷歌/堆栈溢出,并希望有时间节省一些人
Ubuntu的:
sudo apt install nodejs whereis nodejs nodejs: /usr/bin/nodejs /usr/lib/nodejs /usr/include/nodejs /usr/share/nodejs /usr/share/man/man1/nodejs.1.gz
在IntelliJ中configurationNodeJS Intepreter:
File | Settings | Languages & Frameworks | Node.js and NPM Node interpreter: Add... (select from the above path or add it) /usr/bin/nodejs
然后,点击Enable
button并select模块。
在OSX上,如果您已经使用brew安装了Node.js:
/usr/local/bin/node
您可以使用命令的which node
检查机器上的确切文件夹
重要
在OSX上查找程序打开时,您将无法最初导航到此path。 您首先需要导航到根文件夹,例如Macintosh HD
,然后执行键盘快捷键Command + Shift + .
(。=点=周期)能够select隐藏的文件和文件夹。