hexus / phaser-slopes

:triangular_ruler: A Phaser 3 Plugin that smooths out MatterJS Tilemap Layer collisions
ISC License
34 stars 5 forks source link

Webpack Error: Can't Resolve Phaser Source #7

Open B3L7 opened 6 years ago

B3L7 commented 6 years ago

Installed using npm as per readme. Getting the following errors during game build:

`ERROR in ./node_modules/phaser-slopes/src/Matter/World.js Module not found: Error: Can't resolve 'phaser/src/physics/matter-js/lib/geometry/Bounds' in '/home/b3l7/Repos/hoq/node_modules/phaser-slopes/src/Matter' @ ./node_modules/phaser-slopes/src/Matter/World.js 2:0-70 527:9-15 611:9-15 @ ./node_modules/phaser-slopes/src/Overrides.js @ ./node_modules/phaser-slopes/src/Slopes.js @ ./node_modules/phaser-slopes/src/index.js @ ./src/scenes/StageScene.ts @ ./src/main.ts

ERROR in ./node_modules/phaser-slopes/src/Matter/Axes.js Module not found: Error: Can't resolve 'phaser/src/physics/matter-js/lib/geometry/Vector' in '/home/b3l7/Repos/hoq/node_modules/phaser-slopes/src/Matter' @ ./node_modules/phaser-slopes/src/Matter/Axes.js 1:0-70 24:16-22 @ ./node_modules/phaser-slopes/src/Overrides.js @ ./node_modules/phaser-slopes/src/Slopes.js @ ./node_modules/phaser-slopes/src/index.js @ ./src/scenes/StageScene.ts @ ./src/main.ts

ERROR in ./node_modules/phaser-slopes/src/Matter/Resolver.js Module not found: Error: Can't resolve 'phaser/src/physics/matter-js/lib/geometry/Vector' in '/home/b3l7/Repos/hoq/node_modules/phaser-slopes/src/Matter' @ ./node_modules/phaser-slopes/src/Matter/Resolver.js 1:0-70 110:27-33 112:7-13 @ ./node_modules/phaser-slopes/src/Overrides.js @ ./node_modules/phaser-slopes/src/Slopes.js @ ./node_modules/phaser-slopes/src/index.js @ ./src/scenes/StageScene.ts @ ./src/main.ts

ERROR in ./node_modules/phaser-slopes/src/Matter/SAT.js Module not found: Error: Can't resolve 'phaser/src/physics/matter-js/lib/geometry/Vector' in '/home/b3l7/Repos/hoq/node_modules/phaser-slopes/src/Matter' @ ./node_modules/phaser-slopes/src/Matter/SAT.js 1:0-70 157:9-15 157:33-39 160:19-25 168:10-16 210:26-32 210:54-60 222:22-28 347:16-22 362:7-13 372:8-14 372:53-59 376:10-16 376:55-61 400:20-26 401:17-23 433:20-26 434:17-23 469:12-18 475:9-15 501:18-24 516:15-21 529:21-27 536:14-20 567:50-56 @ ./node_modules/phaser-slopes/src/Overrides.js @ ./node_modules/phaser-slopes/src/Slopes.js @ ./node_modules/phaser-slopes/src/index.js @ ./src/scenes/StageScene.ts @ ./src/main.ts

ERROR in ./node_modules/phaser-slopes/src/Matter/World.js Module not found: Error: Can't resolve 'phaser/src/physics/matter-js/lib/geometry/Vector' in '/home/b3l7/Repos/hoq/node_modules/phaser-slopes/src/Matter' @ ./node_modules/phaser-slopes/src/Matter/World.js 3:0-70 32:8-14 32:32-38 48:28-34 118:17-23 155:13-19 156:9-15 168:10-16 169:10-16 170:12-18 175:10-16 176:10-16 177:12-18 187:17-23 188:21-27 189:21-27 195:17-23 196:21-27 197:21-27 203:17-23 204:21-27 205:21-27 211:17-23 212:21-27 213:21-27 219:22-28 221:17-23 223:21-27 227:22-28 229:17-23 231:21-27 236:22-28 239:17-23 240:21-27 244:22-28 247:17-23 248:21-27 253:21-27 254:21-27 256:16-22 280:6-12 354:16-22 355:14-20 356:16-22 357:17-23 540:15-21 540:39-45 541:12-18 541:36-42 657:31-37 670:131-137 670:192-198 675:129-135 675:188-194 680:132-138 680:194-200 685:131-137 685:192-198 @ ./node_modules/phaser-slopes/src/Overrides.js @ ./node_modules/phaser-slopes/src/Slopes.js @ ./node_modules/phaser-slopes/src/index.js @ ./src/scenes/StageScene.ts @ ./src/main.ts

ERROR in ./node_modules/phaser-slopes/src/Matter/SAT.js Module not found: Error: Can't resolve 'phaser/src/physics/matter-js/lib/geometry/Vertices' in '/home/b3l7/Repos/hoq/node_modules/phaser-slopes/src/Matter' @ ./node_modules/phaser-slopes/src/Matter/SAT.js 2:0-74 559:6-14 562:6-14 569:7-15 572:30-38 @ ./node_modules/phaser-slopes/src/Overrides.js @ ./node_modules/phaser-slopes/src/Slopes.js @ ./node_modules/phaser-slopes/src/index.js @ ./src/scenes/StageScene.ts @ ./src/main.ts

ERROR in ./node_modules/phaser-slopes/src/Matter/World.js Module not found: Error: Can't resolve 'phaser/src/tilemaps/components/GetTileAt' in '/home/b3l7/Repos/hoq/node_modules/phaser-slopes/src/Matter' @ ./node_modules/phaser-slopes/src/Matter/World.js 1:0-65 316:9-18 317:11-20 318:11-20 319:12-21 320:14-23 321:15-24 322:17-26 323:18-27 @ ./node_modules/phaser-slopes/src/Overrides.js @ ./node_modules/phaser-slopes/src/Slopes.js @ ./node_modules/phaser-slopes/src/index.js @ ./src/scenes/StageScene.ts @ ./src/main.ts `

hexus commented 6 years ago

I haven't tried this with Typescript before, but it requires Phaser as a dependency so I'm not sure why this would be a problem. I'm surprised that those paths can't be resolved.

I'll try this with a simple Phaser 3 boilerplate when I have the time and see if I can sort this out.

B3L7 commented 6 years ago

Thanks, I appreciate your work. Let me know if I can help in any way.