[英]WebStorm for NodeJS add NPM modules in 'External Libraries'
Is there a way to add the NPM NodeJS External modules so my node project modules appear in 'External Libraries' and are resolved by code completion and navigate?有没有办法添加 NPM NodeJS 外部模块,以便我的节点项目模块出现在“外部库”中,并通过代码完成和导航解决?
Thanks谢谢
Yes, besides enabling code completion in Settings (Ctrl + Alt + S)
> Languages and Frameworks
> Node.js
after downloading it via the Settings
> Plugins
section, You have to actually install the Node.js kind of manually.是的,除了通过“
Settings
>“ Plugins
”部分下载后在Settings (Ctrl + Alt + S)
> Languages and Frameworks
”> Node.js
”中启用代码完成之外,您还必须手动安装 Node.js。
First, create a basic package.json
file containing all the config info needed to install Node.js,首先,创建一个基本的
package.json
文件,其中包含安装 Node.js 所需的所有配置信息,
for more info look here: https://nodejs.dev/learn/the-package-json-guide有关更多信息,请查看此处: https://nodejs.dev/learn/the-package-json-guide
After you've done that, simply open up the terminal emulator ( Alt + f12
) and type in npm install
.完成后,只需打开终端模拟器 (
Alt + f12
) 并输入npm install
。
As long as you have the package.json
file in the same directory, everything should work fine,只要您在同一目录中有
package.json
文件,一切都应该正常,
and your IDE - webstorm in this case, should add Node's external modules automatically,和你的 IDE - 在这种情况下是 webstorm,应该自动添加 Node 的外部模块,
to the External libraries
> Node.js core
section in your project tab.到项目选项卡中的
External libraries
> Node.js core
部分。
Cheers.干杯。
on webstorm go to: 在网络风暴中转到:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.