2016-09-30 10 views
0

Microsoft Azure 앱 서비스에서 LevelDB module으로 Node.js 앱을 만들려고합니다. 이 link에 주어진 단계를 따라 앱을 만들었습니다. 나는 그것을 로컬에서 실행하고 (Windows10 64 비트) Azure로 밀어 넣었다. 브라우저에서 사이트를 열면 HTTP 500 오류가 반환됩니다.Azure node.js에서 LevelDB를 사용하는 동안 오류가 발생했습니다.

https://{app-name}.scm.azurewebsites.net/DebugConsole의 터미널에서 npm start을 실행하면 다음 오류가 발생합니다.

at D:\home\site\wwwroot\node_modules\levelup\lib\levelup.js:119:34 
    at D:\home\site\wwwroot\node_modules\abstract-leveldown\abstract-leveldown.js:39:16 
Express server listening on port 3000  

npm ERR! Windows_NT 6.2.9200 
npm ERR! argv "D:\\Program Files (x86)\\nodejs\\4.4.7\\node.exe" "D:\\Program Files (x86)\\npm\\2.15.8\\node_modules\\npm\\bin\\npm-cli.js" "start" 
npm ERR! node v4.4.7 
npm ERR! npm v2.15.8 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] start: `node app.js` 
npm ERR! Exit status 7 
npm ERR! 
npm ERR! Failed at the [email protected] start script 'node app.js'. 
npm ERR! This is most likely a problem with the appName package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  node app.js 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs appName 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR! 
npm ERR!  npm owner ls appName 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  D:\home\site\wwwroot\npm-debug.log 

나는 levelup.js:119:34의 코드를 확인하고 해당 오류에 대한 로그를 추가했다. 그 로그가 반환 The filename, directory name, or volume label syntax is incorrect.

나는 데이터를 저장하기 위해 LevelDB를 사용하고 있습니다. db를 초기화했습니다. var db = levelup('./mydb', { valueEncoding: 'json'});

Microsoft Azure에서 levelDB를 사용하려면 어떻게해야합니까? 어떤 도움을 주시면 감사하겠습니다. 감사.

+0

몇 가지 코드를 공유 할 수 있다면 도움이 될 것입니다. – Srijan

답변

0

https://github.com/level/levelup#tested--supported-platforms의 요구 사항 설명에 따르면 모듈에는 설치시 node-gyp이 필요합니다. Azure App Service는 모든 네이티브 모듈을 지원하지 않으며 매우 구체적인 사전 요구 사항을 가진 모듈을 컴파일 할 때 실패 할 수도 있습니다.

모듈이 Kudu 콘솔 사이트를 통해 Azure Web Apps에 성공적으로 설치되었는지 확인하고 로컬 Windows 컴퓨터에 32 비트로 모듈을 설치하고 node_modules 폴더를 포함한 전체 응용 프로그램을 Azure Web Apps에 배포 할 수 있습니다.

자세한 내용은 https://azure.microsoft.com/en-us/documentation/articles/nodejs-use-node-modules-azure-apps/을 참조하십시오.

더 이상의 우려 사항이 있으면 언제든지 알려주세요.

관련 문제