Hi,
Is the equivalent for npm rebuild node-sass
command? I'd like to rebuils that package depending on the environment it's used. How can i achieve it in yarn
. Is running yarn add node-sass
does the trick of reinstalling already installed package?
There's a related ticket open in the website project to document the rebuild equivalent there:
https://github.com/yarnpkg/website/issues/192
+1
+1
Don't +1 issues. GitHub adding reactions for a reason. The equivalent command is:
$ yarn install --force
I'm confused:
Running 'docker exec -it web_11 yarn install --force node-sass ...
yarn install v0.16.0
error `install` has been replaced with `add` to add new dependencies. Run "yarn add node-sass" instead.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Which one is it now ?
Upate: it looks like a simple yarn add node-sass
works fine. Is there a difference between npm install --force <pkg>
and yarn add <pkg>
behind the scenes, that we should be aware of ?
@dudeinthemirror As the docs [1] [2], add
is for adding a new dependency, while install
is for installing _all_ dependencies. Trying to install
a single package doesn't make sense with yarn. The docs show that the add
commands take a package name argument, while the install
commands don't, since they work on _all_ dependencies.
Ah, got it. Just started implementing yarn in our project today, so total greenhorn still :) Thanks much @markstos for the info !
For anyone visiting this old thread, this worked for me:
yarn add --force node-sass
Sadly, yarn install --force
does not seem to have the desired effect when using workspaces.
Most helpful comment
Don't +1 issues. GitHub adding reactions for a reason. The equivalent command is: