RadoslavGatev / Ghost-Azure

Production ready Ghost for Azure :ghost:
https://www.gatevnotes.com/introducing-ghost-2-on-azure-web-app-service/
MIT License
131 stars 530 forks source link

Build and deployment fails while deploying via Continuous deployment to Azure App Service #49

Closed anilkumar82 closed 2 years ago

anilkumar82 commented 3 years ago

While deploying this Ghost Blog app via Continuous deployment to Azure App Service am getting error.

Link to the yml file being used, for deployment.

Any help is much appreciated. Thank you.


Log extract from Pipeline is below:

Run npm install npm install npm run build --if-present shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'" npm WARN deprecated mailgun-js@0.22.0: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated bree@6.5.0: bree@7.0.0 drops support for the browser, Node <12.11.0, and removes bthreads entirely. Either upgrade to v7.0.0 or lock your bree version to v6.5.0. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated request-promise@4.2.6: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142 npm WARN deprecated intl-messageformat-parser@2.1.3: We've written a new parser that's 6x faster and is backwards compatible. Please use @formatjs/icu-messageformat-parser npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated node-pre-gyp@0.11.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future npm WARN deprecated formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap. npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated

dtrace-provider@0.8.8 install D:\a\Ghost-Azure\Ghost-Azure\node_modules\dtrace-provider node-gyp rebuild || node suppress-error.js

D:\a\Ghost-Azure\Ghost-Azure\node_modules\dtrace-provider>if not defined npm_config_node_gyp (node "C:\hostedtoolcache\windows\node\12.13.0\x64\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\hostedtoolcache\windows\node\12.13.0\x64\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild ) Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.

re2@1.16.0 install D:\a\Ghost-Azure\Ghost-Azure\node_modules\re2 install-from-cache --artifact build/Release/re2.node --host-var RE2_DOWNLOAD_MIRROR || npm run rebuild

Trying https://github.com/uhop/node-re2/releases/download/1.16.0/win32-x64-72.br ... Writing to build/Release/re2.node ... Done.

sharp@0.29.3 install D:\a\Ghost-Azure\Ghost-Azure\node_modules\sharp (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)

sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.11.3/libvips-8.11.3-win32-x64.tar.br sharp: Creating D:\a\Ghost-Azure\Ghost-Azure\node_modules\sharp\build\Release sharp: Copying DLLs from D:\a\Ghost-Azure\Ghost-Azure\node_modules\sharp\vendor\8.11.3\win32-x64\lib to D:\a\Ghost-Azure\Ghost-Azure\node_modules\sharp\build\Release

sqlite3@5.0.2 install D:\a\Ghost-Azure\Ghost-Azure\node_modules\sqlite3 node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download [sqlite3] Success: "D:\a\Ghost-Azure\Ghost-Azure\node_modules\sqlite3\lib\binding\napi-v3-win32-x64\node_sqlite3.node" is installed via remote npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN notsup Unsupported engine for @tryghost/kg-card-factory@3.1.0: wanted: {"node":"^12.22.1 || ^14.17.0 || ^16.13.0"} (current: {"node":"12.13.0","npm":"6.12.0"}) npm WARN notsup Not compatible with your version of node/npm: @tryghost/kg-card-factory@3.1.0 npm WARN notsup Unsupported engine for @tryghost/kg-default-atoms@3.1.0: wanted: {"node":"^12.22.1 || ^14.17.0 || ^16.13.0"} (current: {"node":"12.13.0","npm":"6.12.0"}) npm WARN notsup Not compatible with your version of node/npm: @tryghost/kg-default-atoms@3.1.0 npm WARN notsup Unsupported engine for @tryghost/kg-default-cards@5.1.0: wanted: {"node":"^12.22.1 || ^14.17.0 || ^16.13.0"} (current: {"node":"12.13.0","npm":"6.12.0"}) npm WARN notsup Not compatible with your version of node/npm: @tryghost/kg-default-cards@5.1.0 npm WARN notsup Unsupported engine for @tryghost/kg-markdown-html-renderer@5.1.0: wanted: {"node":"^12.22.1 || ^14.17.0 || ^16.13.0"} (current: {"node":"12.13.0","npm":"6.12.0"}) npm WARN notsup Not compatible with your version of node/npm: @tryghost/kg-markdown-html-renderer@5.1.0 npm WARN notsup Unsupported engine for @tryghost/kg-mobiledoc-html-renderer@5.2.0: wanted: {"node":"^12.22.1 || ^14.17.0 || ^16.13.0"} (current: {"node":"12.13.0","npm":"6.12.0"}) npm WARN notsup Not compatible with your version of node/npm: @tryghost/kg-mobiledoc-html-renderer@5.2.0 npm WARN notsup Unsupported engine for bookshelf-relations@2.3.0: wanted: {"node":"^12.22.1 || ^14.17.0 || ^16.13.0"} (current: {"node":"12.13.0","npm":"6.12.0"}) npm WARN notsup Not compatible with your version of node/npm: bookshelf-relations@2.3.0 npm WARN notsup Unsupported engine for gscan@4.10.1: wanted: {"node":"^12.22.1 || ^14.17.0 || ^16.13.0"} (current: {"node":"12.13.0","npm":"6.12.0"}) npm WARN notsup Not compatible with your version of node/npm: gscan@4.10.1 npm WARN notsup Unsupported engine for knex-migrator@4.1.1: wanted: {"node":"^12.22.1 || ^14.17.0 || ^16.13.0"} (current: {"node":"12.13.0","npm":"6.12.0"}) npm WARN notsup Not compatible with your version of node/npm: knex-migrator@4.1.1 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN knex@0.20.15 requires a peer of mssql@^6.1.0 but none is installed. You must install peer dependencies yourself. npm WARN knex@0.20.15 requires a peer of mysql2@^2.1.0 but none is installed. You must install peer dependencies yourself. npm WARN knex@0.20.15 requires a peer of pg@^7.18.2 but none is installed. You must install peer dependencies yourself. npm WARN knex@0.20.15 requires a peer of sqlite3@^4.1.1 but none is installed. You must install peer dependencies yourself. npm WARN knex@0.21.21 requires a peer of mssql@^6.2.1 but none is installed. You must install peer dependencies yourself. npm WARN knex@0.21.21 requires a peer of mysql2@^2.1.0 but none is installed. You must install peer dependencies yourself. npm WARN knex@0.21.21 requires a peer of pg@^8.3.0 but none is installed. You must install peer dependencies yourself. npm WARN knex@0.21.19 requires a peer of mssql@^6.2.1 but none is installed. You must install peer dependencies yourself. npm WARN knex@0.21.19 requires a peer of mysql2@^2.1.0 but none is installed. You must install peer dependencies yourself. npm WARN knex@0.21.19 requires a peer of pg@^8.3.0 but none is installed. You must install peer dependencies yourself. npm WARN jsdom@16.7.0 requires a peer of canvas@^2.5.0 but none is installed. You must install peer dependencies yourself. npm WARN ws@7.5.5 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself. npm WARN ws@7.5.5 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself. npm WARN jsdom@18.1.0 requires a peer of canvas@^2.5.0 but none is installed. You must install peer dependencies yourself. npm WARN ws@8.2.3 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself. npm WARN ws@8.2.3 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.

added 1936 packages from 1475 contributors and audited 1976 packages in 149.37s found 35 vulnerabilities (16 moderate, 17 high, 2 critical) run npm audit fix to fix them, or npm audit for details

ghost@4.22.0 build D:\a\Ghost-Azure\Ghost-Azure grunt build

Running "subgrunt:init" (subgrunt) task Warning: The "core/client" directory is not valid, or does not contain a Gruntfile. Use --force to continue.

Aborted due to warnings. npm ERR! code ELIFECYCLE npm ERR! errno 6 npm ERR! ghost@4.22.0 build: grunt build npm ERR! Exit status 6 npm ERR! npm ERR! Failed at the ghost@4.22.0 build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\npm\cache_logs\2021-11-17T18_41_45_295Z-debug.log Error: Process completed with exit code 1.

AzureGhost-BuildDeploy-Issue

RadoslavGatev commented 2 years ago

Hello @anilkumar82 ,

Invoking npm run build in turn invokes grunt build that relies upon having the "client" submodule in place. However, the releases of Ghost don't include that folder. I would suggest not triggering the grunt build as it is usually needed during the development of Ghost.

anilkumar82 commented 2 years ago

@RadoslavGatev - Thank you for your inputs.