npm, nodejs, reactjs? Node and browser(javascript) both uses V8 engine, but browser has DOM, node doesn’t, nodejs has other kind of APIs, nodejs has more freedom to access the os (because it has modules like filesystem, http server, even batteries, so you can create mobile app from nodejs), both nodejs and reactjs use npm for moduel managment, but what’s the difference??

The confusing bit is that npm is a package manager for JavaScript, not necessarily node (even though node is in the name..). Therefore, we can use npm also for web applications. (If we do, we need to use a bundler like webpack though). Some npm modules might work both in the browser and in node, but some will only work on one of them. If the npm module requires some platform-spcific API (DOM for the browser for example) then it will not work for the other platform. https://stackoverflow.com/questions/58985983/general-question-about-reactjs-nodejs-and-npm

rm -rf ~/node_modules/

Centos install

yum install nodejs yum uninstall nodejs node -v npm -v

Upgrade to nodejs8 https://tech.amikelive.com/node-663/quick-tip-installing-nodejs-8-on-centos-7/ yum install epel-release curl –silent –location https://rpm.nodesource.com/setup_8.x | sudo bash - yum install gcc-c++ make yum install -y nodejs

windows安装node js 在console运行,会提示找不到module,比如 cannot find module ‘request’ 只需要执行npm -request即可,如果提示 Error: ENOENT, stat ‘\AppData\Roaming\npm’ 只需要当前目录下创建npm即可 模块系统 Modules 事件 Event 函数 function 路由 route 全局对象 Global Object http://www.w3cschool.cc/nodejs http://www.nodejs.org/ http://www.nodebeginner.org/index-zh-cn.html

https://channel9.msdn.com/Series/Building-Apps-with-Node-js?WT.mc_id=12833-DEV-sitepoint-othercontent

Windows upgrade npm npm install -g npm-windows-upgrade npm-windows-upgrade