0
在手機上加載我的測試MEAN應用程序時,mongo上出現以下錯誤。Mongo在手機上加載時出錯
我不知道哪個模塊是那個,因爲我自己沒有加載它。
奇怪的是,在桌面瀏覽器上,錯誤不會彈出。
我使用貓鼬作爲mongodb驅動程序。可能這個錯誤與它有關。
任何見解?
Error: Cannot find module '../schemas/favicon.icSchema'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at modelNamer (/home/rafapaulin/lab/rpg-am/routes/general.js:13:10)
at /home/rafapaulin/lab/rpg-am/routes/general.js:19:3
at Layer.handle [as handle_request] (/home/rafapaulin/lab/rpg-am/node_modules/express/lib/router/layer.js:95:5)
at next (/home/rafapaulin/lab/rpg-am/node_modules/express/lib/router/route.js:131:13)
at Route.dispatch (/home/rafapaulin/lab/rpg-am/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/home/rafapaulin/lab/rpg-am/node_modules/express/lib/router/layer.js:95:5)
at /home/rafapaulin/lab/rpg-am/node_modules/express/lib/router/index.js:277:22
at param (/home/rafapaulin/lab/rpg-am/node_modules/express/lib/router/index.js:349:14)
at param (/home/rafapaulin/lab/rpg-am/node_modules/express/lib/router/index.js:365:14)
at Function.process_params (/home/rafapaulin/lab/rpg-am/node_modules/express/lib/router/index.js:410:3)
at next (/home/rafapaulin/lab/rpg-am/node_modules/express/lib/router/index.js:271:10)
at Function.handle (/home/rafapaulin/lab/rpg-am/node_modules/express/lib/router/index.js:176:3)
你可以分享一下代碼:'/home/rafapaulin/lab/rpg-am/routes/general.js:13:10'。它可能有幫助。 – unflores
肯定@unflores '變種modelNamer =函數(集合){ 返回要求( '../架構/' + collection.slice(0,-1)+ '模式') };' 基本上,這函數根據傳遞的路由構建模型的名稱。 它在桌面上工作,實際上,它也適用於移動設備上的POST請求......錯誤只是在頁面加載到移動設備上時彈出,但路由仍然有效 –