nodejs終端的坑--新手向

npm install -g react-tools 命令沒法在node.js終端裏運行, node

並報錯npm should be run outside of the node repl, in your normal shell,react

將此命令用cmd運行,,成功運行,,nodejs只能運行js代碼,git

用nodejs運行.js文件, 必須在其餘終端內調用nodejs,,並不能在nodejs內直接運行,shell

如helloworld.js 裏有"console.log('helloworld');"語句 若是要運行hellowrold.js文件,npm

 在cmd內運行"node hellowrold.js"命令, 將在cmd輸出"hellowrold",ide

另外, git shell能夠替代cmdorm

相關文章
相關標籤/搜索