2017-05-17 10 views
0

내 로켈 컴퓨터에서 아무런 문제없이 실행되는 node.js 응용 프로그램이 있습니다. 내가 오류의 기원은 푸른 웹 응용 프로그램에 사용되는 노드 모듈 버전 내에있는 가정부터Azure 웹 응용 프로그램에서 Node.js 오류가 발생했습니다.

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) 

은 이미 몇 가지 솔루션을 시도 : 그러나 나는 다음 오류 때문에 푸른 내에서 실행 만들 현재 수 아니에요 서비스. 그러나 노드 버전을 동일하게 변경하더라도 로컬에서는 트릭을 수행하지 않았습니다. 또한 npm-shrinkwrap을 사용하여 로컬 설치시 패키지 상관 문제를 방지합니다.

누군가가 같은 문제에 빠졌습니까? 해결책이나 힌트가있는 곳이 있습니까?

+0

'package.json' 파일을 제공해 주시겠습니까? 당신은 JSON과 여기 수축 포장을 찾을 수 있습니다 @AronChen –

+0

안녕하세요 : https://1drv.ms/u/s!AldGdcl6FYQEmbo7xRZzcoWMRFdoeQ https://1drv.ms/u/s!AldGdcl6FYQEmbo8sZFlZddxbaZMOw – rdnscr

답변

0

This article 귀하의 질문에 대한 답변을 드릴 수 있습니다.

Azure App Service does not support all native modules and might fail at compiling those with very specific prerequisites. Two workarounds proved successful with almost all native modules available today:

  • Run npm install on a Windows machine that has all the native module's prerequisites installed. Then, deploy the created node_modules folder as part of the application to Azure App Service.

  • Azure App Service can be configured to execute custom bash or shell scripts during deployment, giving you the opportunity to execute custom commands and precisely configure the way npm install is being run. For a video showing how to do this, see Custom Website Deployment Scripts with Kudu .

관련 문제