在安装 NodeBB 的时候,接触到一个命令,
npm install --production
上面的命令是用来一键安装 NodeBB 里面的 package.json 里的配置的包的。
添加了 production 参数后将仅仅 安装 package.json 中 dependencies 里面的包,不会安装
devDependencies 里面的。
package.json 里面的文件内容如下所示:
{
"name": "nodebb",
"license": "GPL-3.0",
"description": "NodeBB Forum",
"version": "1.0.3",
"homepage": "http://www.nodebb.org",
"repository": {
"type": "git",
"url": "https://github.com/NodeBB/NodeBB/"
},
"main": "app.js",
"scripts": {
"start": "node loader.js",
"test": "mocha ./tests -t 10000"
},
"dependencies": {
"async": "~1.5.0",
"autoprefixer": "^6.2.3",
"bcryptjs": "~2.3.0",
"body-parser": "^1.9.0",
"chart.js": "^1.0.2",
"colors": "^1.1.0",
"compression": "^1.1.0",
"connect-ensure-login": "^0.1.1",
"connect-flash": "^0.1.1",
"connect-mongo": "~1.1.0",
"connect-multiparty": "^2.0.0",
"connect-redis": "~3.0.2",
"cookie-parser": "^1.3.3",
"cron": "^1.0.5",
"csurf": "^1.6.1",
"daemon": "~1.1.0",
"express": "^4.9.5",
"express-session": "^1.8.2",
"express-useragent": "0.2.4",
"html-to-text": "2.0.0",
"ip": "1.1.2",
"jimp": "0.2.21",
"less": "^2.0.0",
"logrotate-stream": "^0.2.3",
"lru-cache": "4.0.0",
"mime": "^1.3.4",
"minimist": "^1.1.1",
"mkdirp": "~0.5.0",
"mongodb": "~2.1.3",
"morgan": "^1.3.2",
"mousetrap": "^1.5.3",
"nconf": "~0.8.2",
"nodebb-plugin-composer-default": "3.0.22",
"nodebb-plugin-dbsearch": "1.0.1",
"nodebb-plugin-emoji-one": "1.1.0",
"nodebb-plugin-emoji-extended": "1.1.0",
"nodebb-plugin-markdown": "5.0.1",
"nodebb-plugin-mentions": "1.0.21",
"nodebb-plugin-soundpack-default": "0.1.6",
"nodebb-plugin-spam-be-gone": "0.4.6",
"nodebb-rewards-essentials": "0.0.8",
"nodebb-theme-lavender": "3.0.9",
"nodebb-theme-persona": "4.0.118",
"nodebb-theme-vanilla": "5.0.63",
"nodebb-widget-essentials": "2.0.9",
"nodemailer": "2.0.0",
"nodemailer-sendmail-transport": "1.0.0",
"nodemailer-smtp-transport": "^2.4.1",
"passport": "^0.3.0",
"passport-local": "1.0.0",
"postcss": "^5.0.13",
"prompt": "^1.0.0",
"redis": "~2.4.2",
"request": "^2.44.0",
"rimraf": "~2.5.0",
"rss": "^1.0.0",
"semver": "^5.1.0",
"serve-favicon": "^2.1.5",
"sitemap": "^1.4.0",
"socket.io": "^1.4.0",
"socket.io-client": "^1.4.0",
"socket.io-redis": "^1.0.0",
"socketio-wildcard": "~0.3.0",
"string": "^3.0.0",
"templates.js": "0.3.4",
"toobusy-js": "^0.4.2",
"uglify-js": "^2.6.0",
"underscore": "^1.8.3",
"underscore.deep": "^0.5.1",
"validator": "^5.0.0",
"winston": "^2.1.0",
"xregexp": "~3.1.0"
},
"devDependencies": {
"mocha": "~1.13.0",
"grunt": "~0.4.5",
"grunt-contrib-watch": "^1.0.0"
},
"bugs": {
"url": "https://github.com/NodeBB/NodeBB/issues"
},
"engines": {
"node": ">=0.10"
},
"maintainers": [
{
"name": "Andrew Rodrigues",
"email": "andrew@nodebb.org",
"url": "https://github.com/psychobunny"
},
{
"name": "Julian Lam",
"email": "julian@nodebb.org",
"url": "https://github.com/julianlam"
},
{
"name": "Barış Soner Uşaklı",
"email": "baris@nodebb.org",
"url": "https://github.com/barisusakli"
}
]
}
但是我在安装 NodeBB 里面的包的时候遇到了卡住不动的问题,是镜像地址的问题