Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

118
Visualizações
Parcel Bundler crashes while bundling PNG

I am making a game with Pixi.js and matter-js libraries. I am using Parcel Bundler (version 2.3.1) for HMR and bundling. The dev server works fine but when bundling for production the process crashes with following result:

/c/Program Files/nodejs/npm: line 44:  1511 Illegal instruction     "$NODE_EXE" "$NPM_CLI_JS" "$@"

This is the command I used for starting the process (in build script in package.json):

parcel build src/index.html --dist-dir build --no-source-maps

This code reproduces the problem I am facing:

import {Application, Texture, Sprite} from 'pixi.js';
import grass from './grass.png?quality=75';

const app = new Application();
document.body.appendChild(app.view);

const grassTexture = Texture.from(grass);
const grassSprite = Sprite.from(grassTexture);

app.stage.addChild(grassSprite);
<!DOCTYPE html>
<html lang="en">
<head>
    <title>Document</title>
    <script type="module" src="script.js"></script>
</head>
<body>
    
</body>
</html>

This will, of course, not work here. But this works properly on dev server and produces same result on building.

On searching online I found a few solutions such as deleting package-lock.json and node_modules and then reinstalling them, but it did not work. I also completely uninstalled Node.js and reinstalled it but there was no difference.

If I import PNG as WebP it builds properly though loses some colours, so I assume this is a problem with saving PNGs. I would be content on using WebP if does not lose colours.

Thank you in advanced.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda