2016-09-30 5 views
0

Microsoft AzureアプリケーションサービスでLevelDB moduleを使用してNode.jsアプリケーションを作成しようとしています。私はこのlinkに記載されている手順に従ってアプリを作成しました。私はそれをローカルに実行し(Windows10 64bit)、それを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を使ってデータを保存しています。私はデータベースを初期化しました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に正常にインストールされているかどうかを再確認し、32ビットでローカルWindowsマシンにこれらのモジュールをインストールし、node_modulesフォルダを含むアプリケーション全体をAzure Web Appsに展開してください。

詳細はhttps://azure.microsoft.com/en-us/documentation/articles/nodejs-use-node-modules-azure-apps/を参照してください。

さらに詳しいことがありましたら、お気軽にお知らせください。