pixijs: Latest Pixi not compatible with Angular 7

Continuation of https://github.com/pixijs/pixi.js/issues/4921 since it’s not resolved for v7.

Expected Behavior

Angular 7 with Pixi should build.

Current Behavior

Build fails with multiple instances of:

Module not found: Error: Can't resolve 'path' in ...

Steps to Reproduce

Install Pixi with Angular 7, using official npm packages. Run ng build or ng serve.

Environment

  • pixi.js version: 4.8.5
  • OS & Version: Ubuntu 18.10
  • Angular version: 7.1.2

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 17 (4 by maintainers)

Most upvoted comments

PR welcome to v4.x branch to fix this. I have a release I need to do for v4 so we should be able to get this out quickly.

@ivanpopelyshev

Ahh sorry! I missed your link somehow.

On the link you sent us above. I looked at just the first “annoying example”.

This file

node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/browser.js

By default is node: false but when when it is changed to node: { path: true }. Then the following commands work.

  • ng serve
  • ng build
  • ng build --prod

Soon as I flip that back to node: false. We return to this Issue.

We can I guess assume the article is correct, this is a webpack or angular issue. Pixi just has the symptoms. None the less, for the people experiencing this with pixi, nothing in that article is ideal, I am not sure where we can go to shake a collective fist.

I take it , link that I sent is not related to the issue? It cant find path module, is that right?

Could you please provide a repo the reproduces? We are not Angular folks here and need some help figuring out this integration. Thanks.