我是新來的node.js和我面臨的問題,我已經安裝node.js在我的Windows操作系統,也有我安裝npm npm install node-dev -g
,我檢查npm是在我的操作系統安裝或沒有當我鍵入node-dev script.js沒有重新啓動服務器自動
C:> NPM 它顯示的結果
Usage: npm <command>
where <command> is one of:
add-user, adduser, apihelp, author, bin, bugs, c, cache,
completion, config, ddp, dedupe, deprecate, docs, edit,
explore, faq, find, find-dupes, get, help, help-search,
home, i, info, init, install, isntall, issues, la, link,
list, ll, ln, login, ls, outdated, owner, pack, prefix,
prune, publish, r, rb, rebuild, remove, repo, restart, rm,
root, run-script, s, se, search, set, show, shrinkwrap,
star, stars, start, stop, submodule, tag, test, tst, un,
uninstall, unlink, unpublish, unstar, up, update, v,
version, view, whoami
npm <cmd> -h quick help on <cmd>
npm -l display full usage info
npm faq commonly asked questions
npm help <term> search for help on <term>
npm help npm involved overview
Specify configs in the ini-formatted file:
C:\Documents and Settings\Administrator\.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config
[email protected] C:\node_modules\npm
的是,當我運行 ç其實我面臨的一個問題:>節點-dev的腳本.js 其顯示結果的權利,但是當我編輯我的script.js頁面服務器是n ot重啓自動
這裏是我的script.js頁面代碼 console.log(「hello world」);
您沒有啓動服務器。腳本打印你好世界並退出。無法重新啓動 – bryanmac
我在運行時遇到類似問題:var os = require('os');我們正在'+ os.type()+'的操作系統上運行Node.js'+ process.version +'; console.log(message);終端立即返回,並且不會開始監聽文件更改。這是在運行之後:node-dev script.js。請讓我知道是否有修復/解決方案。 – TheCodingArt
如Greg提到的那樣使用'nodev'。 –