G
G
german nababkah2021-06-22 19:30:46
Node.js
german nababkah, 2021-06-22 19:30:46

I can't deploy my project to Heroku, what should I do?

In general, I’m writing an application on the NestJS framework, apparently I’ve messed up something with dependencies, which is necessary when transferring a project, you have to write yarn not only in the folder of the project itself, but also in the “API” folder, write ’yarn’ in the terminal, then in the folder with client and separately in the meneger folder, and so every time.And on hosting, you can’t manually install packages in each folder, so you need to somehow solve the problem with dependencies, how can I have time until tomorrow?

Here is my pachage.json (in general there are 4 of them, this is the main one):

{
  "name": "turizm",
  "private": true,
  "version": "1.0.0-rc",
  "scripts": {
    "i": "lerna bootstrap",
    "dev": "lerna run dev --parallel",
    "build": "lerna run build",
    "start": "lerna run start --parallel",
    "lint": "lerna run lint",
    "lintfix": "lerna run lintfix"
  },
  "devDependencies": {
    "@nuxt/types": "^2.15.7",
    "@nuxt/typescript-build": "^2.1.0",
    "lerna": "^3.22.1"
  },
  "engines": {
    "node": ">=14.0.0",
    "yarn": ">=1.12.3"
  },

  "dependencies": {
    "@digikare/nestjs-prom": "^1.0.0",
    "@nestjs/common": "^7.5.5",
    "@nestjs/config": "^0.6.3",
    "@nestjs/core": "^7.5.5",
    "@nestjs/jwt": "^7.2.0",
    "@nestjs/mongoose": "^7.2.4",
    "@nestjs/passport": "^7.1.5",
    "@nestjs/swagger": "^4.7.7",
    "@nuxtjs/vuetify": "^1.11.3",
    "@types/jest": "^26.0.16",
    "@types/passport-local": "^1.0.33",
    "bcrypt": "^5.0.1",
    "class-validator": "^0.13.1",
    "cryptr": "^6.0.2",
    "date-fns": "^2.18.0",
    "husky": "^4.3.0",
    "lint-staged": "^10.4.0",
    "mongodb": "3.4",
    "mongoose": "^5.12.14",
    "passport": "^0.4.1",
    "passport-jwt": "^4.0.0",
    "passport-local": "^1.0.0",
    "populate": "^5.0.1",
    "reflect-metadata": "^0.1.13",
    "rxjs": "^6.6.3",
    "swagger-ui-express": "^4.1.5",
    "vuetify": "^2.4.8"
  }
}


And here are the errors while trying to deploy the application in heroku:
-----> 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):  >=14.0.0
       engines.npm (package.json):   unspecified (use default)
       engines.yarn (package.json):  >=1.12.3
       
       Resolving node version >=14.0.0...
       Downloading and installing node 16.3.0...
       Using default npm version: 7.15.1
       Resolving yarn version >=1.12.3...
       Downloading and installing yarn (1.22.10)
       Installed yarn 1.22.10
       
-----> Installing dependencies
       Installing node modules (yarn.lock)
       yarn install v1.22.10
       [1/4] Resolving packages...
       [2/4] Fetching packages...
       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 "@nestjs/swagger > @nestjs/[email protected]" has unmet peer dependency "[email protected]^0.2.0 || ^0.3.0 || ^0.4.0".
       warning "@nuxtjs/vuetify > [email protected]" has unmet peer dependency "[email protected]^4.36.0 || ^5.0.0".
       warning " > [email protected]" has unmet peer dependency "[email protected]^2.6.4".
       warning "@nuxtjs/vuetify > [email protected]" has unmet peer dependency "[email protected]^2.6.10".
       warning "@nuxtjs/vuetify > [email protected]" has unmet peer dependency "[email protected]^4.0.0 || ^5.0.0".
       warning "@nuxtjs/vuetify > vuetify-loader > [email protected]" has unmet peer dependency "[email protected]^4.0.0 || ^5.0.0".
       warning " > [email protected]" has unmet peer dependency "[email protected]>=4.0.0".
       warning "@nuxt/types > [email protected]" has unmet peer dependency "[email protected]^4.36.0 || ^5.0.0".
       warning "@nuxt/typescript-build > [email protected]" has unmet peer dependency "[email protected]*".
       warning "lerna > @lerna/version > @lerna/github-client > @octokit/rest > @octokit/[email protected]" has unmet peer dependency "@octokit/[email protected]>=3".
       [4/4] Building fresh packages...
       Done in 43.35s.
       
-----> Build
       Running build (yarn)
       yarn run v1.22.10
       $ lerna run build
lerna notice cli v3.22.1
lerna info versioning independent
lerna info Executing command in 3 packages: "yarn run build"
lerna ERR! yarn run build exited 127 in 'client'
lerna ERR! yarn run build stdout:
$ nuxt-ts build
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! yarn run build stderr:
/bin/sh: 1: nuxt-ts: not found
error Command failed with exit code 127.
lerna ERR! yarn run build exited 127 in 'client'
lerna WARN complete Waiting for 2 child processes to exit. CTRL-C to exit immediately.
error Command failed with exit code 127.
       info Visit https://yarnpkg.com/en/docs/cli/run 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

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question