question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(new PIXI.Application).start() and stop() is not a function error, in Typescript

See original GitHub issue

Expected Behavior

works just fine.

Current Behavior

With TypeScript.

import * as PIXI from 'pixi.js'
const app = new PIXI.Application()
...
app.stop()

Will result in an error. The attached image shows the result of console.log(app).

If I use yarn add pixi.js@6.4.2, there is no problem, but if I use I get the same error in both 6.5.1 and 6.5.2. It works fine with codepen, etc., but Do you know the cause?

Possible Solution

Version down…

Environment

  • pixi.js version: 6.5.2
  • Browser & Version: Chrome 104
  • OS & Version: Mac OS 12.5.1
  • Running Example: See attached image.
image

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
btravelcommented, Sep 4, 2022

think yarn and npm resolve their PeerDependencies differently. Can you try with npm and see if that makes a difference?

@bigtimebuddy Thanks, seems that yarn is the reason. I’ve found another thread with a working solution for yarn: https://github.com/pixijs/pixijs/issues/6530

I’ve tried Npm version in codesandbox and it works like a charm

0reactions
Thel27commented, Oct 3, 2022

Hi, I got the same problem with a React app from create react app’s module. I tried to upgrade from pixi 6.4.2 to 6.5.4.

Here are my dependency : “webpack”: “4.44.2”, “react”: “^16.13.0”,

Also, I had to install react-app-rewired to change my webpack config and resolve the .mjs problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: PIXI.GrayFilter is not a function
Seems to me that you did not include src/pixi/filters/GrayFilter.js in your source. Make sure that that file is being loaded after the main ......
Read more >
PIXI.Application - PixiJS API Documentation
Convenience class to create a new PixiJS application. ... Note: Setting this parameter to false does NOT stop the shared ticker even if...
Read more >
Getting Started - PixiJS
In this section we're going to build the simplest possible PixiJS application. In doing so, we'll walk through the basics of how to...
Read more >
How to use the pixi.js.Application function in pixi - Snyk
To help you get started, we've selected a few pixi.js.Application ... Application function in pixi ... appendChild(renderer.view) ease = new Ease.list() }.
Read more >
react-pixi-fiber/Lobby - Gitter
I am trying to use react-pixi-fiber with the newest version of Create React App. I updated the react-scripts in the package.json.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found