简体   繁体   English

尝试安装node.js和npm

[英]trying to install node.js and npm

I am trying to get Angular 2 up and running. 我正在尝试启动并运行Angular 2。 The first thing it does is ask me to install node.js and npm. 它要做的第一件事是让我安装node.js和npm。

So I've gone to https://nodejs.org/en/ and downloaded the msi, run it and gone through the install process. 所以我去了https://nodejs.org/en/并下载了msi,运行它并完成了安装过程。

Er... now what? 嗯...现在呢?

I go to my project folder and npm or sudo or any other node command is not recognized. 我转到项目文件夹,并且无法识别npm或sudo或任何其他节点命令。 Surely nodejs needs to be activated or something. 当然,需要激活nodejs或进行其他操作。

What gobsmacks me is that the nodejs site seems to assume I will just magically know the rest of the process. 令我震惊的是,nodejs站点似乎假定我只是会神奇地知道其余的过程。 There's no instructions for actually installing or confiuring the thing. 没有关于实际安装或配置东西的说明。 I guess I'm off to find some hand-rolled blog article from someone who's figured this out ahead of me? 我想我要去找一个在我之前弄清楚了这个问题的人撰写一些手工撰写的博客文章?

After installation of NodeJS you should have npm command with global access. 安装NodeJS之后,您应该具有具有全局访问权限的npm命令。 For initialization of project you would use npm init comand and follow instructions. 对于项目的初始化,您可以使用npm init comand并按照说明进行操作。 If you don't have npm command in the system i suggest you to check NodeJS installation. 如果系统中没有npm命令,建议您检查NodeJS安装。 Fe, you can run node -v to see node version in the system. 例如,您可以运行node -v以查看系统中的节点版本。

After much googling, I found a set of instructions that suggested a reboot is required before nodejs will be available. 经过大量的搜索之后,我发现了一组说明,提示需要重启才能使用nodejs。 True. 真正。

I've opened an issue to suggest this addition to the docs. 我打开了一个问题,建议将此添加到文档中。

People often forget that there is little point in writing docs for those already familiar with a piece of software; 人们通常会忘记,为已经熟悉某种软件的人编写文档毫无意义。 it is the newbie that is most in need of direction. 最需要指导的是新手。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM