J'ai un CMS simple avec le framework KeystoneJs. Le déploiement de celui-ci échoue quand je fais un commit qui déclenche alors un déploiement en azur. J'utilise Azure App Services, qui s'exécute sur le niveau standard.Le déploiement du nœud échoue sur Azure (KeystoneJs CMS)
Il y avait un problème avec Node-gyp
sur Windows, mais selon this, il a été corrigé. Pour l'instant, je recourt à des déploiements FTP. Je ne suis pas vraiment familier avec le nœud, donc je ne sais pas quelle est la meilleure façon de diagnostiquer le problème.
Voici le package.json
{
"name": "MyApp",
"version": "0.0.0",
"private": true,
"dependencies": {
"keystone": "^0.3.22",
"async": "^1.5.0",
"lodash": "^4.13.1",
"dotenv": "^2.0.0"
},
"devDependencies": {
"eslint": "^2.12.0",
"eslint-config-keystone": "^2.3.1",
"eslint-plugin-react": "^5.1.1",
"gulp": "^3.7.0",
"gulp-shell": "^0.5.0",
"gulp-watch": "^4.3.5"
},
"engines": {
"node": "6.7.0",
"npm": "3.9.5"
},
"scripts": {
"lint": "eslint .",
"start": "node keystone.js"
}
}
Voici la sortie de NPM installer sur Kudu
D:\home\site\wwwroot>npm install
npm WARN package.json [email protected] assert is also the name of a node core module.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] buffer is also the name of a node core module.
npm WARN package.json [email protected] crypto is also the name of a node core module.
npm WARN package.json [email protected]8 No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] events is also the name of a node core module.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] querystring is also the name of a node core module.
npm WARN package.json [email protected] punycode is also the name of a node core module.
npm WARN package.json [email protected] string_decoder is also the name of a node core module.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] url is also the name of a node core module.
npm WARN package.json [email protected] util is also the name of a node core module.
> [email protected] install D:\home\site\wwwroot\node_modules\bson
> (node-gyp rebuild 2> builderror.log) || (exit 0)
D:\home\site\wwwroot\node_modules\bson>node "D:\Program Files (x86)\npm\1.4.28\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
> [email protected] install D:\home\site\wwwroot\node_modules\buffertools
> node-gyp rebuild
D:\home\site\wwwroot\node_modules\buffertools>node "D:\Program Files (x86)\npm\1.4.28\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
Traceback (most recent call last):
File "D:\Program Files (x86)\npm\1.4.28\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 18, in <module>
sys.exit(gyp.script_main())
File "D:\Program Files (x86)\npm\1.4.28\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 534, in script_main
return main(sys.argv[1:])
File "D:\Program Files (x86)\npm\1.4.28\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 527, in main
return gyp_main(args)
File "D:\Program Files (x86)\npm\1.4.28\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 503, in gyp_main
options.circular_check)
File "D:\Program Files (x86)\npm\1.4.28\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 98, in Load
generator.CalculateVariables(default_variables, params)
File "D:\Program Files (x86)\npm\1.4.28\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1867, in CalculateVariables
generator_flags.get('msvs_version', 'auto'))
File "D:\Program Files (x86)\npm\1.4.28\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSVersion.py", line 402, in SelectVisualStudioVersion
versions = _DetectVisualStudioVersions(version_map[version], 'e' in version)
KeyError: '2015'
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the buffertools 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 their info via:
npm ERR! npm owner ls buffertools
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "node" "D:\\Program Files (x86)\\npm\\1.4.28\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd D:\home\site\wwwroot
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
S'il vous plaît laissez-moi savoir si vous avez besoin de plus d'information afin de diagnostiquer le problème.
Merci Jed. Bizarre, je pensais spécifier le moteur dans package.json dirait azur d'utiliser la bonne version. Va vérifier le matin. – MrBliz