クリスマスに node.js を使用してプロジェクトを作成したいと考えており、今月の .Net マガジンのチュートリアルを使用して私を助けています。Henrik Joretag によって書かれた 私は十分に単純だと思っていましたが、最初のハードルで問題にぶつかったようです。
package.json ファイルを作成したら、それを実行してみます。次のエラーが表示されます。
error TypeError: Cannot call method 'replace' of undefined
error at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read- json.js:332:45
error at fs.js:117:20
error at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:53:5
error at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:62:5
error at Object.oncomplete (fs.js:297:15)
チュートリアルでは、package.json ファイルを作成した後は機能するはずであると述べているため、これを構成する方法について完全に迷っています。私のpackage.jsonは次のようになります。
{
"name": "sample-dashboard.iwishiwaschucknorris.com",
"version" : "0.0.1",
"homepage" : "http://sample-dashboard.iwishiwaschucknorris.com",
"description" : "Mind-meldification for teams",
"dependencies" : {
"backbone" : "",
"underscore" : "",
"express" : "",
"stitch" : "",
"andbang-express-auth" : "",
"precommit-hook" : "",
"clientmodules" : "",
"templatizer" : "",
"andlog" : "",
"getconfig" : "",
"connect-githead" : ""
},
"clientmodules" : ["andlog","backbone","underscore"],
"main" : "server.js",
"scripts" : {
"postinstall" : "node node_modules/clientmodules/install.js"
}
}
私は本当にnodeとbackbone.jsに慣れたいと思っているので、これに関する助けは素晴らしいでしょう。