Open scottmcdonnell opened 8 years ago
Hi there, trying to run your starter pack with no success. Using Phaser 2.4.6
ERROR in [default] C:/Users/kikemx78/Desktop/phaser-typescript-starter/src/app/Game.ts:3:24 Cannot find module 'phaser'.
And so may others....
Any clue??
@kikemx78 Phaser definition file reference now added. Can you try again?
scottmcdonnell No change at all after adding your last commit on typings/extra.d.ts
scottmcdonnell Brief update...getting same errors even with a small build ...
`var path = require('path');
var webpack = require('webpack');
var phaserModule = path.join(__dirname, '/node_modules/phaser/');
var phaser = path.join(phaserModule, 'build/custom/phaser-split.js'),
pixi = path.join(phaserModule, 'build/custom/pixi.js'),
p2 = path.join(phaserModule, 'build/custom/p2.js');
module.exports = {
entry: "./src/entry.ts",
output: {
path: "./dist/",
filename: "./dist/bundle.js"
},
watch: true,
module: {
loaders: [
{ test: /\.css$/, loader: "style!css" },
{ test: /\.ts$/, loader: 'ts-loader' },
{ test: /pixi.js/, loader: "script" },
]
},
resolve: {
extensions: ['', '.webpack.js', '.web.js', '.ts', '.js'],
alias: {
'phaser': phaser,
'pixi.js': pixi,
'p2': p2,
}
},
> };`
@kikemx78 the latest commit is working for me in a fresh clone on node 5.4 and npm 3.6. Try a fresh clone to a new folder or
#clean up all files
npm run clean
#fresh install of node modules
npm install
#run dev server
npm start
@scottmcdonnell It does works...thanx a lot !!
There is a Phaser issue with the latest release causing typescript compilation errors.
The workaround at the moment is to use the v2.4.6 until the 2.4.9 release hopefully fixes errors.