-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
[Docs] yarn berry installation #40933
Comments
+1 |
Near as I can tell, Yarn's berry repo is just... Yarn? See https://getbootstrap.com/docs/5.3/getting-started/download/#yarn for latest docs, and https://github.com/twbs/examples/tree/main/sass-js for more updated examples. |
Here is what happens when you follow those instructions: ➡️ ~/Desktop
git clone https://github.com/twbs/examples.git
➡️ ~/Desktop
cd examples/sass-js/
➡️ ~/Desktop/examples/sass-js main
nvm install --lts && nvm use --lts
➡️ ~/Desktop/examples/sass-js main 8s
corepack enable
➡️ ~/Desktop/examples/sass-js main
yarn set version stable
➡️ ~/Desktop/examples/sass-js main*
git diff | cat
diff --git a/package.json b/package.json
index 3cde257..b5e6273 100644
--- a/package.json
+++ b/package.json
@@ -4,5 +4,6 @@
"version": "0.0.0",
"private": true,
"repository": "twbs/examples",
- "license": "MIT"
+ "license": "MIT",
+ "packageManager": "[email protected]"
}
➡️ ~/Desktop/examples/sass-js main*
yarn
Usage Error: The nearest package directory (/Users/williamentriken/Desktop/examples/sass-js) doesn't seem to be part of the project declared in /Users/williamentriken/Desktop/examples.
- If /Users/williamentriken/Desktop/examples isn't intended to be a project, remove any yarn.lock and/or package.json file there.
- If /Users/williamentriken/Desktop/examples is intended to be a project, it might be that you forgot to list sass-js in its workspace configuration.
- Finally, if /Users/williamentriken/Desktop/examples is fine and you intend sass-js to be treated as a completely separate project (not even a workspace), create an empty yarn.lock file in it.
$ yarn install [--json] [--immutable] [--immutable-cache] [--refresh-lockfile] [--check-cache] [--check-resolutions] [--inline-builds] [--mode #0] |
Just tried it real quick, I haven't got any issues by doing the following:
It created automatically a Am I missing something here? |
@julien-deramond can you please do yarn --version? You may be running Yarn v1 which is the old one which is not Yarn Berry. |
My bad, I thought I had the latest version, I had by default the v1. Thanks @fulldecent for pointing it out.
yarn config set nodeLinker node-modules This will create a
If we modify this section of the documentation to mention that, would it be OK? I mean, without using Yarn Plug'n'Play |
Thank you, this is super helpful, I really appreciate it. These are magic little lines of code that can be really hard to find so it is great to see them together. Perhaps when we update the documentation, we can put this as yarn Berry, but then also keep the old yarn 1.X below it. |
FYI, I've created #41036 just to mention this "trick" to compile our examples with Yarn Berry in the documentation. It's probably better than nothing already, :) let's continue the discussion in the PR if needed. |
Prerequisites
Proposal
The install documentation explains how to set up with yarn.
Please also explain how to set up with yarn berry.
Motivation and context
This setup is non-trivial. I am several days into learning the difference between sass/sass-loader and how to make it work with Yarn Berry.
Good documentation here might help many people.
Also
That page links to https://github.com/twbs/bootstrap-npm-starter which is archived and it references Node SASS which is also archived.
Perhaps this further illustrates how non-trivial this is.
The text was updated successfully, but these errors were encountered: