下面是兩個包,我試圖把我的項目推到與他們的heroku,控制檯說npm和節點安裝在服務器上,但當我克隆項目沒有node_modules目錄在項目中。 package.json中的'bower install'說沒有找到bower。當我刪除'bower install'時,在推送時服務器上不會安裝依賴項,儘管控制檯在安裝時將它們寫下來,但是在打開瀏覽器控制檯時它們並未安裝在服務器上。node_modules沒有安裝在heroku上
的package.json:
{
"name": "meal-order",
"version": "0.0.0",
"description": "This is an app for ordering meal",
"main": "gulpfile.js",
"dependencies": {
"angular": "^1.5.5",
.....(other angular -libs)
"express": "^4.14.0",
"gulp": "^3.8.8",
"gulp-connect": "^3.0.9",
"ionicons": "^3.0.0",
"protractor": "^3.3.0"
},
"devDependencies": {
"bower": "1.7.7"
},
"engines": {
"node": "^5.11.1",
"npm": "^3.8.6"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node index.js",
"postinstall": "bower install"
},
bower.json:
"dependencies": {
"angular": "^1.5.5",
.....(other angular -libs)
"express": "^4.14.0",
"gulp": "^3.8.8",
"gulp-connect": "^3.0.9",
"ionicons": "^3.0.0",
"protractor": "^3.3.0"
},
"devDependencies": {},
"main": "gulpfile.js",
"license": "ISC",
"moduleType": [
"node"
],
的.gitignore:
/node_modules/*
node_modules/*
node_modules
npm-debug.log
這是錯誤我得到的控制檯:
remote: -----> Restoring cache
remote: Skipping cache restore (new runtime signature)
remote:
remote: -----> Building dependencies
remote: Installing node modules (package.json)
remote:
remote: > [email protected] postinstall /tmp/build_3ac183217c4c79ebe98cbb69eecb36de
remote: > bower install
remote:
remote: sh: 1: bower: not found
remote:
remote: npm ERR! Linux 3.13.0-91-generic
移動'bower' t o依賴關係不會改變任何我仍然面臨同樣問題的問題 – developer