Counting objects: 64, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (58/58), done.
Writing objects: 100% (64/64), 541.82 KiB | 12.90 MiB/s, done.
Total 64 (delta 15), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: ! No default language could be detected for this app.
remote: HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
remote: See https://devcenter.heroku.com/articles/buildpacks
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to stockandtrack.
remote:
尝试将Node.js应用程序推送到Heroku时出现上述错误。我已验证我的package.json
在根文件夹中,并且已将引擎声明添加到我的package.json
中。我继续收到此错误。以下是我的package.json
和文件夹结构:
{
"name": "test",
"version": "1.0.0",
"engines": {
"node": "8.9.4"
},
"main": "server.js",
"scripts": {
"start": "if-env NODE_ENV=production && yarn run start:prod || yarn run start:dev",
"start:prod": "node server.js",
"start:dev": "concurrently \"nodemon --ignore 'client/*'\" \"yarn run client\"",
"client": "cd client && yarn run start",
"install": "cd client && yarn install",
"build": "cd client && yarn run build",
"heroku-postbuild": "yarn run build"
},
"dependencies": {
"cors": "^2.8.4",
"express": "^4.16.3",
"mysql": "^2.16.0",
"path": "^0.12.7"
},
"devDependencies": {
"concurrently": "^3.5.0",
"nodemon": "^1.11.0"
}
}
任何帮助将不胜感激!