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.

🐛 BUG: Wrong versions of packages in build cache leading to build failures

See original GitHub issue

Quick checklist

  • I am using the latest version of Snowpack and all plugins.

What package manager are you using?

npm node 16.12.0

What operating system are you using?

macOS

Describe the bug

When trying to do a React project build with snowpack, I get a build failure when I attempt to import and render any components from @inlet/react-pixi.

[23:30:24] [snowpack] ENOENT: no such file or directory, open '/Users/alex/Dev/octagon-board-test/node_modules/.cache/snowpack/build/eventemitter3@4.0.7/eventemitter3.js'

When inspecting the .cache/snowpack/build directory, I see a directory named eventemitter3@3.1.2

When attempting to manually edit the directory name to force a match, I then get a similar problem with the version of punycode, and manually editing the name doesn’t get me anywhere. At this point, I’m not sure why the build cache versions aren’t matching what’s expected by snowpack.

I will update with an example if it turns out this is an interesting problem and not me being dumb somehow. But following my instruction should get you an example pretty quickly.

Thanks for any advice on this!

Steps to reproduce

  1. Follow the snowpack react tutorial (https://www.snowpack.dev/tutorials/react) to get a skeleton project that can render a React component.

  2. In the root component (say, App.js), use this code:

import React from 'react';
import { Stage, Sprite } from '@inlet/react-pixi';

export default function App() {
    return <Stage>
        <Sprite image="https://s3-us-west-2.amazonaws.com/s.cdpn.io/693612/IaUrttj.png" x={100} y={100} />
    </Stage>
};
  1. Run npm start

Note: react-pixi works fine in create-react-app, which leads me to believe it’s a snowpack issue.

Link to minimal reproducible example (optional)

No response

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
takerukoushiroucommented, Jun 22, 2022

Can confirm the same issue with only pixi.js as the sole dependency using NPM when restarting snowpack dev. Downgraded to 3.8.6 and issue disappears.

0reactions
ambastoscommented, Nov 2, 2022

Can confirm the same issue with only pixi.js as the sole dependency using NPM when restarting snowpack dev. Downgraded to 3.8.6 and issue disappears.

Works for me!

Read more comments on GitHub >

github_iconTop Results From Across the Web

🐛 BUG: Wrong versions of packages in build cache leading to ...
When trying to do a React project build with snowpack, I get a build failure when I attempt to import and render any...
Read more >
Found conflicts between different versions of 'assembly' that ...
This error occurs during a build when more than one version of the same dependent assembly is referenced in a build of the...
Read more >
pip uses incorrect cached package version, instead of the user ...
I just had a similar problem and found that the only way to get pip to upgrade the package was to delete the...
Read more >
Error Codes | Yarn - Package Manager
A package build failed. This problem typically doesn't come from Yarn itself, and simply means that a package described as having build directives...
Read more >
Build Cache - Gradle User Manual
Missing task outputs can cause build failures if Gradle does not completely capture all outputs for a given task. Wrongly declared task inputs...
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