大佬教程收集整理的这篇文章主要介绍了Node.js应用程序在本地工作,但heroku表示缺少模块,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
Error: CAnnot find module 'indexof' at Function.Module._resolveFilename <module.js:338:15> at Function.Module._load <module.js:280:25> at Module.require <module.js:364:17> at require <module.js:380:17> at Object.<anonymous> </app/node_modules/socket.io/node_modules/socket.io-parser/node_modules/emitter/index.js:6:13> at Module._compile <module.js:456:26> at Object.Module._extensions..js <module.js:474:10> at Module.load <module.js:356:32> at FuncTin.Module._load <module.js:312:12> at Module.require <module.js:364:17>
所以我发现indexof是Socket.IO使用的一个模块,它在我的node_modules文件夹中,但由于某种原因,它不会被推送到heroku或者它不被识别。我重新安装了我的模块5-6次,并重新创建了应用程序,但仍然给我同样的错误。我的package.json文件有3个依赖关系:Express,Socket.IO和Jade
以上是大佬教程为你收集整理的Node.js应用程序在本地工作,但heroku表示缺少模块全部内容,希望文章能够帮你解决Node.js应用程序在本地工作,但heroku表示缺少模块所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。