Jump to content

Cannot read property 'resources' of undefined


Recommended Posts

when i importing pixi in my webpack project it throws this error 

Uncaught TypeError: Cannot read property 'resources' of undefined

code looks like this 

const PIXI = require("pixi.js");
import { loader } from 'pixi.js'

let resources = PIXI.loader.resources;

but when i importing to html cdn version everything  works fine

Link to comment
Share on other sites

7 minutes ago, ivan.popelyshev said:

Which version do you use? Also, pixijs can be accessed through global variable, there's no need to define it. For actual way to connect it to webpack please search through pixijs issues on github, there were many like that.

it was 5.0.0-rc.2 ?

i didn't check version ?‍♂️

 i install 4.8.6 it works 



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...