2016-07-24 9 views
1

Я развернул приложение узла в лазуре. деталь окружающей среды в лазурной веб-приложение как following-Проблема с перестройкой узла-gyp для lwip в лазурном веб-приложении: фатальная ошибка C1083: невозможно открыть файл include: 'nan.h': нет такого файла или каталога

Python version : 2.7 
Platform : 32 bit 
Dotnet framework : 4.6 
Node version : 6.3.0 
Npm version: 3.10.3 

В моем приложении я использую LwIP, который нужно построить с помощью Visual C++ инструменты для сборки. Когда я делаю npm install, его отказ от node-gyp rebuild. Я не подвожу много сообщение об ошибке для того же типа сообщения

«фатальную C1083 ошибка: не удается открыть включают файл:„nan.h“: Нет такого файла или каталог»

Я проверил, что наном модуле есть в node_modules.

Полный лог прилагается здесь:

D:\home\site\wwwroot>npm install 

> [email protected] install D:\home\site\wwwroot\node_modules\lwip 
> node-gyp rebuild 


D:\home\site\wwwroot\node_modules\lwip>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\npm\3.10.3\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild) else (node "" rebuild) 
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. 
    init.cpp 
d:\home\site\wwwroot\node_modules\lwip\src\decoder\decoder.h(13): fatal error C1083: Cannot open include file: 'nan.h': No such file or directory [D:\home\site\wwwroot\node_modules\lwip\build\lwip_decoder.vcxproj] 
    util.cpp 
d:\home\site\wwwroot\node_modules\lwip\src\decoder\decoder.h(13): fatal error C1083: Cannot open include file: 'nan.h': No such file or directory [D:\home\site\wwwroot\node_modules\lwip\build\lwip_decoder.vcxproj] 
    buffer_worker.cpp 
d:\home\site\wwwroot\node_modules\lwip\src\decoder\decoder.h(13): fatal error C1083: Cannot open include file: 'nan.h': No such file or directory [D:\home\site\wwwroot\node_modules\lwip\build\lwip_decoder.vcxproj] 
    jpeg_decoder.cpp 
d:\home\site\wwwroot\node_modules\lwip\src\decoder\decoder.h(13): fatal error C1083: Cannot open include file: 'nan.h': No such file or directory [D:\home\site\wwwroot\node_modules\lwip\build\lwip_decoder.vcxproj] 
    png_decoder.cpp 
d:\home\site\wwwroot\node_modules\lwip\src\decoder\decoder.h(13): fatal error C1083: Cannot open include file: 'nan.h': No such file or directory [D:\home\site\wwwroot\node_modules\lwip\build\lwip_decoder.vcxproj] 
    gif_decoder.cpp 
d:\home\site\wwwroot\node_modules\lwip\src\decoder\decoder.h(13): fatal error C1083: Cannot open include file: 'nan.h': No such file or directory [D:\home\site\wwwroot\node_modules\lwip\build\lwip_decoder.vcxproj] 
    init.cpp 
d:\home\site\wwwroot\node_modules\lwip\src\encoder\encoder.h(11): fatal error C1083: Cannot open include file: 'nan.h': No such file or directory [D:\home\site\wwwroot\node_modules\lwip\build\lwip_encoder.vcxproj] 
    jpeg_worker.cpp 
d:\home\site\wwwroot\node_modules\lwip\src\encoder\encoder.h(11): fatal error C1083: Cannot open include file: 'nan.h': No such file or directory [D:\home\site\wwwroot\node_modules\lwip\build\lwip_encoder.vcxproj] 
    png_worker.cpp 
d:\home\site\wwwroot\node_modules\lwip\src\encoder\encoder.h(11): fatal error C1083: Cannot open include file: 'nan.h': No such file or directory [D:\home\site\wwwroot\node_modules\lwip\build\lwip_encoder.vcxproj] 
    gif_worker.cpp 
d:\home\site\wwwroot\node_modules\lwip\src\encoder\encoder.h(11): fatal error C1083: Cannot open include file: 'nan.h': No such file or directory [D:\home\site\wwwroot\node_modules\lwip\build\lwip_encoder.vcxproj] 
    init.cpp 
d:\home\site\wwwroot\node_modules\lwip\src\image\image.h(13): fatal error C1083: Cannot open include file: 'nan.h': No such file or directory [D:\home\site\wwwroot\node_modules\lwip\build\lwip_image.vcxproj] 
    image.cpp 
d:\home\site\wwwroot\node_modules\lwip\src\image\image.h(13): fatal error C1083: Cannot open include file: 'nan.h': No such file or directory [D:\home\site\wwwroot\node_modules\lwip\build\lwip_image.vcxproj] 
    resize_worker.cpp 
d:\home\site\wwwroot\node_modules\lwip\src\image\image.h(13): fatal error C1083: Cannot open include file: 'nan.h': No such file or directory [D:\home\site\wwwroot\node_modules\lwip\build\lwip_image.vcxproj] 
    rotate_worker.cpp 
d:\home\site\wwwroot\node_modules\lwip\src\image\image.h(13): fatal error C1083: Cannot open include file: 'nan.h': No such file or directory [D:\home\site\wwwroot\node_modules\lwip\build\lwip_image.vcxproj] 
    blur_worker.cpp 
d:\home\site\wwwroot\node_modules\lwip\src\image\image.h(13): fatal error C1083: Cannot open include file: 'nan.h': No such file or directory [D:\home\site\wwwroot\node_modules\lwip\build\lwip_image.vcxproj] 
    crop_worker.cpp 
d:\home\site\wwwroot\node_modules\lwip\src\image\image.h(13): fatal error C1083: Cannot open include file: 'nan.h': No such file or directory [D:\home\site\wwwroot\node_modules\lwip\build\lwip_image.vcxproj] 
    mirror_worker.cpp 
d:\home\site\wwwroot\node_modules\lwip\src\image\image.h(13): fatal error C1083: Cannot open include file: 'nan.h': No such file or directory [D:\home\site\wwwroot\node_modules\lwip\build\lwip_image.vcxproj] 
    pad_worker.cpp 
d:\home\site\wwwroot\node_modules\lwip\src\image\image.h(13): fatal error C1083: Cannot open include file: 'nan.h': No such file or directory [D:\home\site\wwwroot\node_modules\lwip\build\lwip_image.vcxproj] 
    sharpen_worker.cpp 
d:\home\site\wwwroot\node_modules\lwip\src\image\image.h(13): fatal error C1083: Cannot open include file: 'nan.h': No such file or directory [D:\home\site\wwwroot\node_modules\lwip\build\lwip_image.vcxproj] 
    hsla_worker.cpp 
d:\home\site\wwwroot\node_modules\lwip\src\image\image.h(13): fatal error C1083: Cannot open include file: 'nan.h': No such file or directory [D:\home\site\wwwroot\node_modules\lwip\build\lwip_image.vcxproj] 
    opacify_worker.cpp 
d:\home\site\wwwroot\node_modules\lwip\src\image\image.h(13): fatal error C1083: Cannot open include file: 'nan.h': No such file or directory [D:\home\site\wwwroot\node_modules\lwip\build\lwip_image.vcxproj] 
    paste_worker.cpp 
d:\home\site\wwwroot\node_modules\lwip\src\image\image.h(13): fatal error C1083: Cannot open include file: 'nan.h': No such file or directory [D:\home\site\wwwroot\node_modules\lwip\build\lwip_image.vcxproj] 
    setpixel_worker.cpp 
d:\home\site\wwwroot\node_modules\lwip\src\image\image.h(13): fatal error C1083: Cannot open include file: 'nan.h': No such file or directory [D:\home\site\wwwroot\node_modules\lwip\build\lwip_image.vcxproj] 
gyp ERR! build error 
gyp ERR! stack Error: `msbuild` failed with exit code: 1 
gyp ERR! stack  at ChildProcess.onExit (C:\Program Files (x86)\npm\3.10.3\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23) 
gyp ERR! stack  at emitTwo (events.js:106:13) 
gyp ERR! stack  at ChildProcess.emit (events.js:191:7) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12) 
gyp ERR! System Windows_NT 6.2.9200 
gyp ERR! command "D:\\Program Files (x86)\\nodejs\\6.3.0\\node.exe" "C:\\Program Files (x86)\\npm\\3.10.3\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" 
gyp ERR! cwd D:\home\site\wwwroot\node_modules\lwip 
gyp ERR! node -v v6.3.0 
gyp ERR! node-gyp -v v3.3.1 
gyp ERR! not ok 
npm WARN optional Skipping failed optional dependency /chokidar/fsevents: 
npm WARN notsup Not compatible with your operating system or architecture: [email protected] 
npm WARN [email protected] No repository field. 
npm WARN [email protected] No license field. 
npm ERR! Windows_NT 6.2.9200 
npm ERR! argv "D:\\Program Files (x86)\\nodejs\\6.3.0\\node.exe" "D:\\Program Files (x86)\\npm\\3.10.3\\node_modules\\npm\\bin\\npm-cli.js" "install" 
npm ERR! node v6.3.0 
npm ERR! npm v3.10.3 
npm ERR! code ELIFECYCLE 

npm ERR! [email protected] install: `node-gyp rebuild` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'. 
npm ERR! Make sure you have the latest version of node.js and npm installed. 
npm ERR! If you do, this is most likely a problem with the lwip package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  node-gyp rebuild 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs lwip 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls lwip 
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 

Благодарности

ответ

1

В настоящее время Azure Azure App служба не поддерживает все родные модули и, возможно, не в составлении тех, с очень специфическими предпосылками.

В качестве обходного пути вы можете запустить npm install на своей локальной машине Windows, на которой установлены все необходимые условия для собственного модуля. Затем разверните созданную папку node_modules как часть приложения в Azure App Service.

Для получения дополнительной информации обратитесь к https://azure.microsoft.com/en-us/documentation/articles/nodejs-use-node-modules-azure-apps/.

+0

Развертывание с локальным git. Как развернуть (вручную скопировать) 'node_modules', если он не версирован? –

+0

Заполните локальную папку 'node_modules', скопируйте ее на Azure и распакуйте этот почтовый индекс. –

+0

Да, забыл про FTP. –