Deployment on Heroku
-
Hi, since this morning I meet issue when push to heroku.
Nothing has changed in my code, but now I have:remote: -----> Build remote: Running build remote: remote: > tokengrowth@0.0.1 build remote: > quasar build remote: remote: sh: 1: quasar: not found remote: npm ERR! code 127
Yesterday, it was going well with this package.json:
{ "name": "", "version": "0.0.1", "description": "", "productName": "", "author": "Traumaxp", "private": true, "scripts": { "build": "quasar build", "start": "node server.js", "lint": "eslint --ext .js,.vue ./", "test": "echo \"No test specified\" && exit 0" }, "dependencies": { "@quasar/extras": "^1.0.0", "axios": "^0.21.1", "connect-history-api-fallback": "^1.6.0", "core-js": "^3.6.5", "express": "^4.17.1", "quasar": "^1.0.0", "serve-static": "^1.14.1", "vue-i18n": "^8.0.0" }, "devDependencies": { "@quasar/app": "^2.0.0", "@quasar/quasar-app-extension-dotenv": "^1.1.0", "babel-eslint": "^10.0.1", "eslint": "^6.8.0", "eslint-config-standard": "^14.1.0", "eslint-loader": "^3.0.3", "eslint-plugin-import": "^2.14.0", "eslint-plugin-node": "^11.0.0", "eslint-plugin-promise": "^4.0.1", "eslint-plugin-standard": "^4.0.0", "eslint-plugin-vue": "^6.1.2" }, "browserslist": [ "last 10 Chrome versions", "last 10 Firefox versions", "last 4 Edge versions", "last 7 Safari versions", "last 8 Android versions", "last 8 ChromeAndroid versions", "last 8 FirefoxAndroid versions", "last 10 iOS versions", "last 5 Opera versions" ], "engines": { "node": ">= 15.12.0", "npm": ">= 7.6.3", "yarn": ">= 1.22.5" } }
Thanks.
-
my server.js
const express = require('express'), serveStatic = require('serve-static'), history = require('connect-history-api-fallback'), port = process.env.PORT || 5000 const app = express() app.use(history()) app.use(serveStatic(__dirname + '/dist/spa')) app.listen(port)
-
I tried to add this:
"heroku-postbuild": "npm install --only=dev --no-shrinkwrap && npm run build"
but same issue.
-
Nothing changed in my code, and It works this morning… Thanks Heroku…