Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

1.7K
Views
Heroku deploy with vitejs error H10 (vite: not found)

I'm trying to deploy my frontEnd app in heroku but only what I get is errors.I was fixing error by error, but i do not know what to do with that one.

by the way I'm using vitejs

the error what i get from heroku logs

2021-07-30T11:30:06.680426+00:00 heroku[web.1]: Starting process with command `npm run dev`
2021-07-30T11:30:10.593125+00:00 app[web.1]: 
2021-07-30T11:30:10.593146+00:00 app[web.1]: > myapp@1.0.0 dev
2021-07-30T11:30:10.593146+00:00 app[web.1]: > vite
2021-07-30T11:30:10.593146+00:00 app[web.1]: 
2021-07-30T11:30:10.614517+00:00 app[web.1]: sh: 1: vite: not found
2021-07-30T11:30:10.686497+00:00 heroku[web.1]: Process exited with status 127
2021-07-30T11:30:10.789749+00:00 heroku[web.1]: State changed from starting to crashed
2021-07-30T11:38:04.881585+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=example.herokuapp.com dyno= connect= service= status=503 bytes= protocol=https

my package.json

{
  "name": "myapp",
  "description": "a really cool app",
  "version": "1.0.0",
  "engines": {
    "node": "<=16.x.x",
    "npm": "<=7.x.x"
  },
  "scripts": {
    "dev": "vite",
    "build": "vite build"
  },
  "dependencies": {
    "react": "17.0.0",
    "react-dom": "17.0.0",
    "styled-components": "5.3.0"
  },
  "devDependencies": {
    "@vitejs/plugin-react-refresh": "1.3.1",
    "vite": "2.4.2"
  },
  "peerDependencies": {
    "react-spring": "^9.2.4"
  }
}
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Found the solution here : https://github.com/vitejs/vite/issues/1215

You have to unset the production mode of npm env or yarn env, as :

heroku config:set NPM_CONFIG_PRODUCTION=false YARN_PRODUCTION=false

or if you use dokku :

dokku config:set my-app NPM_CONFIG_PRODUCTION=false YARN_PRODUCTION=false
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!