strapi-legacy-blog icon indicating copy to clipboard operation
strapi-legacy-blog copied to clipboard

Deploy to Heroku fails

Open Hextar opened this issue 3 years ago • 1 comments

Issue

  • It's not possible to deploy that repository to Heroku.

How to replicate:

  • follow that heroku deploy link as described in this article.
  • insert app nam, region and Cloudify api keys
  • deploy app
  • after some time the deploy will fail

I can share my Heroku logs:


-----> Building on the Heroku-20 stack
-----> Using buildpack: heroku/nodejs
-----> Node.js app detected
       
-----> Creating runtime environment
       
       NPM_CONFIG_LOGLEVEL=error
       USE_YARN_CACHE=true
       NODE_VERBOSE=false
       NODE_ENV=production
       NODE_MODULES_CACHE=true
       
-----> Installing binaries
       engines.node (package.json):  >=10.0.0
       engines.npm (package.json):   >=6.0.0
       engines.yarn (package.json):  unspecified (use default)
       
       Resolving node version >=10.0.0...
       Downloading and installing node 16.1.0...
       Bootstrapping npm >=6.0.0 (replacing 7.11.2)...
       npm >=6.0.0 installed
       Resolving yarn version 1.22.x...
       Downloading and installing yarn (1.22.10)
       Installed yarn 1.22.10
       
-----> Prebuild
       Running heroku-prebuild (yarn)
       yarn run v1.22.10
       $ node scripts/postgres-env.js
       Start running postgres-env
       .env file is generated
       Finish running postgres-env
       Done in 0.13s.
       
-----> Installing dependencies
       Installing node modules (yarn.lock)
       yarn install v1.22.10
       [1/4] Resolving packages...
       [2/4] Fetching packages...
       warning [email protected]: Invalid bin field for "url-loader".
       info [email protected]: The platform "linux" is incompatible with this module.
       info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
       info [email protected]: The platform "linux" is incompatible with this module.
       info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
       [3/4] Linking dependencies...
       warning "strapi-admin > [email protected]" has unmet peer dependency "[email protected] - 3".
       warning "strapi-admin > [email protected]" has unmet peer dependency "popper.js@^1.16.0".
       warning " > [email protected]" has incorrect peer dependency "knex@^0.20.0".
       warning "strapi-plugin-graphql > [email protected]" has unmet peer dependency "koa@^2".
       warning "strapi-plugin-graphql > [email protected]" has incorrect peer dependency "graphql@^0.9.1 || ^0.10.0 || ^0.12.0 || ^0.13.0".
       warning "strapi-plugin-users-permissions > [email protected]" has unmet peer dependency "koa@>=2.0.0".
���       [4/4] Building fresh packages...
       error /tmp/build_3c6cf89b/node_modules/sharp: Command failed.
       Exit code: 1
       Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
       Arguments: 
       Directory: /tmp/build_3c6cf89b/node_modules/sharp
       Output:
       info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.9.0/libvips-8.9.0-linux-x64.tar.gz
       (node:2976) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
       (Use `node --trace-deprecation ...` to show where the warning was created)
       make: Entering directory '/tmp/build_3c6cf89b/node_modules/sharp/build'
         TOUCH Release/obj.target/libvips-cpp.stamp
         CXX(target) Release/obj.target/sharp/src/common.o
       <command-line>: warning: "_GLIBCXX_USE_CXX11_ABI" redefined
       <command-line>: note: this is the location of the previous definition
       In file included from /app/.cache/node-gyp/16.1.0/include/node/v8.h:30,
                        from /app/.cache/node-gyp/16.1.0/include/node/node.h:63,
                        from ../src/common.cc:22:
       /app/.cache/node-gyp/16.1.0/include/node/v8-internal.h: In function ‘void v8::internal::PerformCastCheck(T*)’:
       /app/.cache/node-gyp/16.1.0/include/node/v8-internal.h:452:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
         452 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
             |                                      ^~~~~~~~~~~
             |                                      remove_cv
       /app/.cache/node-gyp/16.1.0/include/node/v8-internal.h:452:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
         452 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
             |                                      ^~~~~~~~~~~
             |                                      remove_cv
       /app/.cache/node-gyp/16.1.0/include/node/v8-internal.h:452:50: error: template argument 2 is invalid
         452 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
             |                                                  ^
       /app/.cache/node-gyp/16.1.0/include/node/v8-internal.h:452:63: error: ‘::Perform’ has not been declared
         452 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
             |                                                               ^~~~~~~
       make: *** [sharp.target.mk:139: Release/obj.target/sharp/src/common.o] Error 1
       make: Leaving directory '/tmp/build_3c6cf89b/node_modules/sharp/build'
       gyp ERR! build error 
       gyp ERR! stack Error: `make` failed with exit code: 2
       gyp ERR! stack     at ChildProcess.onExit (/tmp/build_3c6cf89b/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
       gyp ERR! stack     at ChildProcess.emit (node:events:365:28)
       gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
       gyp ERR! System Linux 4.4.0-1088-aws
       gyp ERR! command "/tmp/build_3c6cf89b/.heroku/node/bin/node" "/tmp/build_3c6cf89b/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
       gyp ERR! cwd /tmp/build_3c6cf89b/node_modules/sharp
       gyp ERR! node -v v16.1.0
       gyp ERR! node-gyp -v v7.1.2
       gyp ERR! not ok
       info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
�������
-----> Build failed
       
       We're sorry this build is failing! You can troubleshoot common issues here:
       https://devcenter.heroku.com/articles/troubleshooting-node-deploys
       
       Some possible problems:
       
       - Dangerous semver range (>) in engines.node
         https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
       
       Love,
       Heroku
       
 !     Push rejected, failed to compile Node.js app.

 !     Push failed

For what I've understood this error is related on node_sass being incompatible with node 16 (latest) but I can't get if the failing deploy is Heroku fault, or something need to be changed on this repository to make it work.

error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’

Anyway I will appreciate if I could get some assistance on that!

Hextar avatar May 04 '21 21:05 Hextar