我是新的nodejs和heroku,我正在嘗試部署我的第一個應用程序。nodejs上的heroku commiting node_modules文件路徑太長
已閱讀此帖Should I check in node_modules to git when creating a node.js app on Heroku?看來最好的做法是提交node_modules文件夾。
我的問題是,我不能提交一些node_modules,因爲文件路徑似乎太長,無法管理git。有沒有其他人有這個問題?我使用SourceTree作爲我的Git GUI和運行Windows 7的
錯誤我在sourcetree得到的是:
git -c diff.mnemonicprefix=false -c core.quotepath=false rm -q -f -- node_modules/gulp-concat/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/index.js
fatal: pathspec 'node_modules/gulp-concat/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/index.js' did not match any files
感謝
因此,爲了嘗試解決路徑問題,我將整個回購庫進一步向根目錄移動,我重新安裝了我的模塊,然後提交了一個全新的應用程序。提交似乎工作正常,所有內容都在線上推送。然而,當我開始我的應用程序,我得到「錯誤:無法找到模塊'Lodash._basebind」。 – 2014-08-29 10:58:27
所以現在我正在通過手動添加它說找不到的每個模塊,每當我安裝並提交一個新模塊時,它說它找不到另一個模塊。非常非常困惑。 – 2014-08-29 11:24:59