-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] Install hangs on postinstall @roots/browserslist-config (bud 6.14.*) #2370
Comments
I can't reproduce. Here's what I tried:
git clone git@github.com:roots/sage
// ...
"devDependencies": {
"@roots/bud": "6.14.2",
"@roots/bud-eslint": "6.14.2",
"@roots/bud-prettier": "6.14.2",
"@roots/bud-sass": "6.14.2",
"@roots/bud-stylelint": "6.14.2",
"@roots/eslint-config": "6.14.2",
"@roots/sage": "6.14.2"
},
"packageManager": "yarn@3.6.1"
}
➤ YN0000: Retrieving https://repo.yarnpkg.com/3.6.1/packages/yarnpkg-cli/bin/yarn.js
➤ YN0000: Saving the new release in .yarn/releases/yarn-3.6.1.cjs
➤ YN0000: Done in 0s 351ms
yarnPath: .yarn/releases/yarn-3.6.1.cjs
nodeLinker: node-modules
➤ YN0000: ┌ Resolution step
➤ YN0032: │ fsevents@npm:2.3.2: Implicit dependencies on node-gyp are discouraged
➤ YN0002: │ @roots/bud-react@npm:6.14.2 doesn't provide @babel/core (p168e4), requested by @babel/preset-react
➤ YN0002: │ @roots/bud-sass@npm:6.14.2 doesn't provide postcss (p464d4), requested by postcss-scss
➤ YN0002: │ @roots/bud-sass@npm:6.14.2 doesn't provide stylelint (p32256), requested by stylelint-scss
➤ YN0002: │ @roots/bud-sass@npm:6.14.2 doesn't provide stylelint (pe7733), requested by stylelint-config-recommended-scss
➤ YN0002: │ @roots/bud-sass@npm:6.14.2 doesn't provide webpack (pb9519), requested by sass-loader
➤ YN0002: │ @roots/bud-stylelint@npm:6.14.2 doesn't provide webpack (pd6895), requested by stylelint-webpack-plugin
➤ YN0002: │ @roots/eslint-config@npm:6.14.2 doesn't provide @babel/core (pda859), requested by @babel/eslint-parser
➤ YN0002: │ @roots/eslint-config@npm:6.14.2 doesn't provide eslint (pcabb3), requested by @babel/eslint-parser
➤ YN0002: │ @roots/eslint-config@npm:6.14.2 doesn't provide eslint (p6ceb2), requested by @typescript-eslint/eslint-plugin
➤ YN0002: │ @roots/eslint-config@npm:6.14.2 doesn't provide eslint (pc39b8), requested by @typescript-eslint/parser
➤ YN0002: │ @roots/eslint-config@npm:6.14.2 doesn't provide eslint (pd1d83), requested by eslint-config-prettier
➤ YN0002: │ @roots/eslint-config@npm:6.14.2 doesn't provide eslint (p9b323), requested by eslint-plugin-import
➤ YN0002: │ @roots/eslint-config@npm:6.14.2 doesn't provide eslint (p79b89), requested by eslint-plugin-jsx-a11y
➤ YN0002: │ @roots/eslint-config@npm:6.14.2 doesn't provide eslint (p37223), requested by eslint-plugin-prettier
➤ YN0002: │ @roots/eslint-config@npm:6.14.2 doesn't provide eslint (pcdf70), requested by eslint-plugin-react-hooks
➤ YN0002: │ @roots/eslint-config@npm:6.14.2 doesn't provide eslint (pc5423), requested by eslint-plugin-react
➤ YN0002: │ @roots/eslint-config@npm:6.14.2 doesn't provide prettier (pbc406), requested by eslint-plugin-prettier
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 6s 679ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ yargs-parser@npm:20.2.9 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yml-loader@npm:2.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yocto-queue@npm:0.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yoga-wasm-web@npm:0.3.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ zwitch@npm:2.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0000: └ Completed in 4s 607ms
➤ YN0000: ┌ Link step
➤ YN0007: │ @roots/bud-framework@npm:6.14.2 must be built because it never has been before or the last one failed
➤ YN0007: │ @roots/browserslist-config@npm:6.14.2 must be built because it never has been before or the last one failed
➤ YN0007: │ core-js-pure@npm:3.26.1 must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 17s 428ms
➤ YN0000: Done with warnings in 28s 841ms If you check out the postinstall script that is hanging it doesn't do anything with tailwindcss or anything like that. Also, even if it fails it shouldn't cause problems. All it is trying to do is make sure that // @ts-check
/* eslint-disable n/no-process-env */
/* eslint-disable n/no-process-exit */
import {execaCommandSync} from 'execa'
if (!process.env.CI) {
try {
execaCommandSync(`npx browserslist --update-db`, {
cwd: process.env.INIT_CWD ?? process.cwd(),
reject: false,
timeout: 10000,
})
} catch (e) {}
}
export {} I think this may be a yarn issue.. Can you try wiping your cache?
Also interested in output from:
And what happens if you run the script manually: node node_modules/@roots/browserslist-config/scripts/postinstall.mjs FWIW I use yarn berry personally and have had issues in the past with it:
|
Not sure what you're upgrading from but it's worth noting that this postinstall script was last changed 4 months ago: |
This was a new install, so no prior installation of this particular theme. I've tried again today and this time the process hung on another package ( Here's the output of ➤ YN0000: ┌ Resolution step
➤ YN0002: │ @roots/bud-react@npm:6.14.2 doesn't provide @babel/core (p168e4), requested by @babel/preset-react
➤ YN0002: │ @roots/bud-sass@npm:6.14.2 doesn't provide postcss (p464d4), requested by postcss-scss
➤ YN0002: │ @roots/bud-sass@npm:6.14.2 doesn't provide stylelint (p32256), requested by stylelint-scss
➤ YN0002: │ @roots/bud-sass@npm:6.14.2 doesn't provide stylelint (pe7733), requested by stylelint-config-recommended-scss
➤ YN0002: │ @roots/bud-sass@npm:6.14.2 doesn't provide webpack (pb9519), requested by sass-loader
➤ YN0002: │ @roots/bud-stylelint@npm:6.14.2 doesn't provide webpack (pd6895), requested by stylelint-webpack-plugin
➤ YN0002: │ @roots/eslint-config@npm:6.14.2 doesn't provide @babel/core (pda859), requested by @babel/eslint-parser
➤ YN0002: │ @roots/eslint-config@npm:6.14.2 doesn't provide eslint (pcabb3), requested by @babel/eslint-parser
➤ YN0002: │ @roots/eslint-config@npm:6.14.2 doesn't provide eslint (p6ceb2), requested by @typescript-eslint/eslint-plugin
➤ YN0002: │ @roots/eslint-config@npm:6.14.2 doesn't provide eslint (pc39b8), requested by @typescript-eslint/parser
➤ YN0002: │ @roots/eslint-config@npm:6.14.2 doesn't provide eslint (pd1d83), requested by eslint-config-prettier
➤ YN0002: │ @roots/eslint-config@npm:6.14.2 doesn't provide eslint (p9b323), requested by eslint-plugin-import
➤ YN0002: │ @roots/eslint-config@npm:6.14.2 doesn't provide eslint (p79b89), requested by eslint-plugin-jsx-a11y
➤ YN0002: │ @roots/eslint-config@npm:6.14.2 doesn't provide eslint (p37223), requested by eslint-plugin-prettier
➤ YN0002: │ @roots/eslint-config@npm:6.14.2 doesn't provide eslint (pcdf70), requested by eslint-plugin-react-hooks
➤ YN0002: │ @roots/eslint-config@npm:6.14.2 doesn't provide eslint (pc5423), requested by eslint-plugin-react
➤ YN0002: │ @roots/eslint-config@npm:6.14.2 doesn't provide prettier (pbc406), requested by eslint-plugin-prettier
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 0s 285ms
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 24s 844ms
➤ YN0000: ┌ Link step
➤ YN0007: │ @roots/bud-framework@npm:6.14.2 must be built because it never has been before or the last one failed
➤ YN0007: │ @roots/browserslist-config@npm:6.14.2 must be built because it never has been before or the last one failed
➤ YN0007: │ core-js-pure@npm:3.26.1 must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 64m 43s
➤ YN0000: Done with warnings in 65m 8s |
Just a follow-up, as I'm still having the problem and others have reported it too. The problem seems to be related to the post install script running It's probably better to open a ticket over at browserslist/caniuse-lite right, as the issue doesn't really pertain to bud? |
I'm not sure if this is the proper thing to reopen this issue, but there are now a couple of users in the thread mentioned above that report the same issue. I'm unsure how to reproduce this outside bud's codebase, I've tried the following:
That seems to run without any delays whereas the same command in a Sage+Bud theme runs for almost half an hour. Do you perhaps know of another way of debugging this? |
I can confirm this exact same issue on a clean install of Sage 10. It took 8 minutes to run |
I just updated my dependencies and am also blocked by this issue. |
#2467 was recently merged and will be included in the next nightly release (in about 7 hours from now) For folks that are running into this issue, we'd appreciate if you could let us know if the upcoming nightly works We're still unable to reproduce this on our end, and the "+1" comments aren't particularly helpful if you're not willing to at least provide at a minimum some basic information about what versions of bud.js, node, and yarn that you're using. You can just throw a 👍 reaction at the top of this issue if you're also hitting this bug and unwilling to provide info about your setup. |
I had the same issue. The nightly build seems to solve it, thanks |
I bought a new MacBook Pro recently (with an M2 chip) and thought the issue wouldn't occur on this new machine, but it did when I upgraded an existing project from 6.15.2 to 6.17.0. I bumped all dependencies to the 2023.10.25-8 nightly and this seems to have resolved the issue. Linking now just took 2 seconds. |
I had the same problem with bud |
I'm glad to read that this seems to be working better. If anybody still has problems related to caniuse-lite in >=6.18.0 remember you can disable the behavior entirely by:
{
"bud": {
"browserslistUpdate": false
}
} Just remember to run the caniuse-db upgrade yourself, from time-to-time. That said, hopefully the new setup will simply work and reduce maintenance chores in your projects. All's well that ends well, bet, but I still suspect this was a yarn thing because:
But, pursuing it further seems foolish, given yarn's lead maintainer is adamantly opposed to postinstall scripts, conceptually:
Fair enough, okay. |
Agreement
Describe the issue
This seems related to an earlier issue I reported, but this time the installation hangs on
@roots/browserslist-config
.I don't use Tailwind and remove all packages and references before running
yarn install
. My yarn is set to berry (yarn set version berry
) and usesnode-modules
as thenodeLinker
value in.yarnrc.yml
.The resulting error is this (when I cancel the hanging operation):
^C➤ YN0009: │ @roots/browserslist-config@npm:6.12.3 couldn't be built successfully (exit code 129, logs can be found here: /private/var/folders/4f/h19r8j2j25xg29kdytj48_xh0000gn/T/xfs-47fc8e4c/build.log)
The log only displays this:
These are my packages:
The release notes of bud 6.12.* mention something about post install issues in relation to CI, but I don't think that's applicable in my case.
Expected Behavior
Full installation of 6.14.*
Actual Behavior
The installation hangs on installing
@roots/browserslist-config
.Steps To Reproduce
yarn set version berry
)version
6.14.2
Logs
No response
Configuration
No response
Relevant .budfiles
No response
The text was updated successfully, but these errors were encountered: