12
ฉันควรเช็คอิน node_modules เป็น git เมื่อสร้างแอป node.js บน Heroku หรือไม่
ฉันทำตามคำแนะนำเบื้องต้นในการเริ่มต้นสำหรับ node.js ใน Heroku ที่นี่: https://devcenter.heroku.com/categories/nodejs คำสั่งเหล่านี้ไม่ได้บอกให้คุณสร้าง. gitignore node_modules ดังนั้นจึงบอกเป็นนัยว่า node_modules ควรถูกตรวจสอบใน git เมื่อฉันรวม node_modules ในคอมไพล์แอปพลิเคชันเริ่มต้นของฉันทำงานอย่างถูกต้อง เมื่อฉันทำตามตัวอย่างขั้นสูงเพิ่มเติมได้ที่: https://devcenter.heroku.com/articles/realtime-polyglot-app-node-ruby-mongodb-socketio https://github.com/mongolab/tractorpush-server (แหล่งที่มา) มันสั่งให้ฉันเพิ่ม node_modules ใน. gitignore ดังนั้นฉันจึงลบ node_modules จาก git เพิ่มลงใน. gitignore จากนั้นปรับใช้ใหม่ เวลานี้การปรับใช้ล้มเหลวเช่นนี้: -----> Heroku receiving push -----> Node.js app detected -----> Resolving engine versions Using Node.js version: 0.8.2 Using npm …