【发布时间】:2017-05-17 06:27:15
【问题描述】:
我有一个 node.js 应用程序在我的语言环境机器上无缝运行。但是由于以下错误,我目前无法使其在 azure 中运行:
TypeError: Object #<Object> has no method '_extend'
at Function.init (D:\home\site\wwwroot\node_modules\finalhandler\node_modules\debug\src\node.js:234:28)
at createDebug (D:\home\site\wwwroot\node_modules\finalhandler\node_modules\debug\src\debug.js:124:13)
at Object.<anonymous> (D:\home\site\wwwroot\node_modules\finalhandler\index.js:14:28)
at Module._compile (module.js:446:26)
at Object..js (module.js:464:10)
at Module.load (module.js:353:31)
at Function._load (module.js:311:12)
at Module.require (module.js:359:17)
at require (module.js:375:17)
at Object.<anonymous> (D:\home\site\wwwroot\node_modules\express\lib\application.js:16:20)
我已经尝试了几种解决方案,因为我认为错误的根源在于 azure Web 应用程序服务上使用的节点模块版本。然而,即使将节点版本更改为我在本地的相同版本也没有成功。除了防止我的本地安装出现包关联问题外,我还使用了 npm-shrinkwrap。
有没有人遇到过同样的麻烦,并且可能有解决方案或提示可以进一步寻找?
【问题讨论】:
-
你能提供你的
package.json文件吗? -
嗨@AronChen,你可以在这里找到json和shrinkwrap:1drv.ms/u/s!AldGdcl6FYQEmbo7xRZzcoWMRFdoeQ1drv.ms/u/s!AldGdcl6FYQEmbo8sZFlZddxbaZMOw
标签: node.js azure azure-web-app-service