Closed Vlad7is7lav closed 7 months ago
Same error
@pixi/react: 7.1.0 pixi.js: 7.2.4 react: 18.2.0 react-dom: 18.2.0
Chrome 122.0.6261.94
Hey, this should be fixed in the next release of pixi
@Zyie - is this fix only going to be in v8? I was hoping to avoid an upgrade right now.
Sorry, should have clarified, it will be fixed in the next v7 release We already have the fix in v8
Hey, pixi 7.4.2 should have solved this
https://github.com/pixijs/pixijs/releases/tag/v7.4.2
let me know if you still have issues and we can reopen this one
Current Behavior
When I start (npm run dev) in next.js I get the error ReferenceError: Worker is not defined at Object. (S:\My Projects\spores\node_modules\@pixi\assets\lib_virtual\checkImageBitmap.worker.js:22:30)
I tried to change next.config.js with next code
if (!isServer) { config.module.rules.push({ test: /pixi\.js$/, use: [ { loader: 'worker-loader', options: { inline: true, fallback: false }, }, ], }) }
but it didn't help me.How can I solve this problem? Please, help me anybody :(
Expected Behavior
Run application
Steps to Reproduce
`import { FC, useState, useEffect } from 'react' import s from './GamePage.module.scss' import { Stage, Text, Graphics } from "@pixi/react";
interface GamePage {}
export const GamePage: FC = () => {
const draw = (g:any) => { g.beginFill(0x0033cc, 1) g.drawRect(250, 150, 150, 120) g.endFill() }
return (
) }`
Environment
@pixi/react
version: e.g. 7.0.0pixi.js
version: e.g. 7.1.0React
version: e.g. 18.0.0ReactDOM
version: e.g. 18.0.0Possible Solution
No response
Additional Information
No response