🐛 BUG: Wrong versions of packages in build cache leading to build failures
See original GitHub issueQuick 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
-
Follow the snowpack react tutorial (https://www.snowpack.dev/tutorials/react) to get a skeleton project that can render a React component.
-
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>
};
- 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:
- Created 2 years ago
- Comments:5
Top GitHub Comments
Can confirm the same issue with only
pixi.js
as the sole dependency using NPM when restartingsnowpack dev
. Downgraded to 3.8.6 and issue disappears.Works for me!