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.

Cannot set property glCore of #<Object> which has only a getter

See original GitHub issue

Totally new to Pixi. I include the script like so:

  <script src="./pixi.min.js"></script>
  <script type="module" src="./app.js"></script>
</body>

In app.js:

import * as PIXI from './pixi.min.js';

const app = new PIXI.Application({
  width: 800,
  height: 600,
  backgroundColor: 0xAAAAAA
});

document.body.appendChild(app.view);

Error:

index.js:24 Uncaught TypeError: Cannot set property glCore of #<Object> which has only a getter at Object.16…/GLBuffer (VM913 pixi.min.js:9) at i (VM913 pixi.min.js:8) at VM913 pixi.min.js:8 at Object.64…/Application (VM913 pixi.min.js:12) at i (VM913 pixi.min.js:8) at VM913 pixi.min.js:8 at Object.126…/core (VM913 pixi.min.js:16) at i (VM913 pixi.min.js:8) at VM913 pixi.min.js:8 at Object.<anonymous> (VM913 pixi.min.js:20)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
bigtimebuddycommented, Nov 6, 2020

npm dist-tags are the best information for the latest version. Unfortunately, releases are ordered by date not semver.

1reaction
ivanpopelyshevcommented, Nov 6, 2020

lets see… you load pixi globally, then use “import *” in app.js . Weird. Just remove this line and it should work. I personally dont use modules at all, so you have to wait for someone else 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot set Property which has only a Getter in JS
The "Cannot set property which has only a getter" error occurs when trying to set a new value to a property, for which...
Read more >
Cannot set property glCore of #<Object> which has only a ...
Totally new to Pixi. I include the script like so: In app.js: import * as PIXI from './pixi.min.js'; const app = new PIXI....
Read more >
TypeError: setting getter-only property "x" - JavaScript | MDN
TypeError : Cannot set property x of #<Object> which has only a getter (V8-based) TypeError: setting getter-only property "x" (Firefox) TypeError: Attempted ...
Read more >
Cannot set property stack of [object Object] which has only ...
I am getting the following error in the following plunker. Cannot set property stack of [object Object] ...
Read more >
Cannot set property material of [object Object] which has ...
I use AssetContainer.instantiateModelsToScene() clone the model.I need to clone the material.An error was throw.
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