-
-
Notifications
You must be signed in to change notification settings - Fork 188
Webpack build fails after upgrade from postcss-cssnext 2.9.0 to 2.10.0 #357
Comments
Looks like a caniuse-api issue. Can you try upgrading this package if possible? |
thanks for responding. I don't have caniuse-api as a direct dependency of my project. it's a dependency of postcss-cssnext - the version of caniuse-api which postcss-cssnext is using is |
Same here with Rollup. /Frontend-Starter-Kit/node_modules/caniuse-api/dist/index.js:69
return data.stats[browser[0]] && data.stats[browser[0]][browser[1]] === "y";
^ |
It's giving errors, see MoOx#357.
So I ran into this too, and did some digging. The issue is not so much the version of caniuse-api (since the caret specified that that would be used with 2.9.0 as well), but rather the addition of I've submitted #358 to at least be able to release another version that successfully builds. The root cause of course still needs investigation. Unfortunately I'm not familiar enough with the code base at this time to be able to properly do that myself. |
I actually did some more digging. The problem seems to be that, one way or another, version 1.0.30000590 of caniuse-db gets installed, which is not the latest version and does not contain an entry for the I'm not sure why that doesn't happen. Perhaps there's a different package locking caniuse-db to a lower version, and then Yarn (which I use) thinking that using that is fine too. |
All right, I think I've figured it out, with a proper fix this time (sorry for the comment spam). The reason 1.0.30000590 was installed was, I think, simply because it already was installed, so in Yarn's view it was good enough to just leave that be. I think it can be forced to install at least the correct version by specifying it as a peerDependency. Since I don't have that much experience with publishing libraries I don't know how to test this, though, so I can't be 100% sure. Anyway, I've submitted that as #359. A workaround for now is to specify the newer version of caniuse-db in yarn.lock:
|
@Vinnl thanks man! had the same issue using postcss + postcss-cssnext directly, but only on travis with cached node_modules dir. deleting the node_modules caches on travis fixed it I believe ... does that make sense? |
@thisconnect Yes, that makes sense. |
I also experience this issue when I use a CI tool. I use Circle CI and whenever it tests my code, it alerts |
with correspondence to @Vinnl 's answer, had the same issue, and the same fix worked for npm shrinkwrap. |
I've deleted directories caniuse-api and caniuse-db, and run |
Upgrading Gatsby to 2.10.0 broke webpack builds. Pinning to 2.9.0 until this is fixed. |
Can you try with 2.11.0 ? |
|
nevermind, I saw a suggestion to clear cache. I had to remove my node_modules dir locally and clear cache in CircleCI to get the build to go through. |
having the same issue on 2.11 |
You need to respect the peer dep yourself. 2.11 specifiy the correct deps. |
@datajohnny Try |
This issue is indeed happening again with 2.11.0 (see #381). I've submitted #380 to fix this, but until then, either clear your node_modules or, if you're using Yarn, modify your |
Also reported here: Fyrd/caniuse#3441 |
hello there. I tried upgrading from 2.9.0 t0 2.10.0 and now getting the error below when I do a Webpack build. I can't tell if this is a Webpack bug, cssnext bug, caniuse bug, or something else.
any ideas? thanks in advance
The text was updated successfully, but these errors were encountered: