Я пытаюсь развернуть свою первую игру на Heroku. Я использую фреймворк Phaser 3 и веб-пакет. У меня ошибка code=H10 desc="App crashed" method=GET path="/" host=sleepy-forest-46011.herokuapp.com request_id=cdd348a8-548c-4553-bdfe-a0f702cdaf28 fwd="123.16.93.73" dyno= connect= service= status=503 bytes= protocol=https
, я пробовал Heroku restart
и heroku ps:scale web=0
, а затем heroku ps:scale web=1
, но ничего не работает. Мой пакет. json выглядит так:
{
"name": "Dung-Salvation-Shooter-Game-JS",
"version": "1.0.0",
"description": "Shooter game built with Javascript using Phaser and Webpack. Capstone Project for Microverse on the top of my Javascript knowledge.",
"main": "src/index.js",
"scripts": {
"test": "jest",
"build": "webpack --config webpack/prod.js ",
"start": "webpack-dev-server --config webpack/base.js --open"
},
"repository": {
"type": "git",
"url": "git+https://github.com/javitocor/Dung-Salvation-Shooter-Game-JS.git"
},
"keywords": [],
"author": "Javier Correas",
"license": "MIT",
"licenseUrl": "http://www.opensource.org/licenses/mit-license.php",
"bugs": {
"url": "https://github.com/javitocor/Dung-Salvation-Shooter-Game-JS/issues"
},
"homepage": "https://github.com/javitocor/Dung-Salvation-Shooter-Game-JS#readme",
"devDependencies": {
"@babel/core": "^7.10.5",
"@babel/preset-env": "^7.10.4",
"babel-loader": "^8.1.0",
"clean-webpack-plugin": "^3.0.0",
"file-loader": "^4.3.0",
"html-webpack-plugin": "^3.2.0",
"jest": "^26.1.0",
"raw-loader": "^3.1.0",
"terser-webpack-plugin": "^2.3.7",
"webpack": "^4.44.0",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0",
"webpack-merge": "^4.2.2"
},
"dependencies": {
"node-fetch": "^2.6.0",
"phaser": "^3.24.1",
"phaser3-rex-plugins": "^1.1.21",
"regenerator-runtime": "^0.13.7"
}
}
Мой файл Procfile:
web:npm start
И моя конфигурация веб-пакета:
const webpack = require('webpack');
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const {
CleanWebpackPlugin,
} = require('clean-webpack-plugin');
module.exports = {
mode: 'development',
devtool: 'eval-source-map',
module: {
rules: [{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
},
},
{
test: [/\.vert$/, /\.frag$/],
use: 'raw-loader',
},
{
test: /\.(gif|png|jpe?g|svg|xml)$/i,
use: 'file-loader',
},
],
},
plugins: [
new CleanWebpackPlugin({
root: path.resolve(__dirname, '../'),
}),
new webpack.DefinePlugin({
CANVAS_RENDERER: JSON.stringify(true),
WEBGL_RENDERER: JSON.stringify(true),
}),
new HtmlWebpackPlugin({
template: './index.html',
}),
],
};
Я также пытался развернуть это в Netlify с этой ошибкой: ./node_modules/webpack-dev-server/client/index.js?http://localhost:8080
Любая помощь будет приветствоваться Спасибо