yarnpkg

How to change Yarn default packages directory?

雨燕双飞 提交于 2019-12-20 10:25:51
问题 When Yarn is used to install dependencies, it puts them in node-modules directory by default. How can I change this to i.e Laravel resources folder? Like .bowerrc is used for bower to set "directory": "resources/assets" 回答1: yarn install --modules-folder ./resources UPDATE: Keep an eye on this GitHub Issue as this feature is not quite stable. UPDATE 2: From Damien's answer below, you can add --install.modules-folder "./resources" to a .yarnrc file so that you don't need to continually pass

How to upgrade yarn version using terminal?

那年仲夏 提交于 2019-12-20 09:25:37
问题 How should yarn be upgraded to the latest version? 回答1: For macOS users, if you installed yarn via brew , you can upgrade it using the below command: brew upgrade yarn 回答2: npm install --global yarn npm upgrade --global yarn This should work. Try and let me know if its not working. 回答3: On Linux, just run below command at terminal: $ curl --compressed -o- -L https://yarnpkg.com/install.sh | bash After do this, close the current terminal and open it again. And then, run below command to check

How to use yarn in ASP.Net core MVC to install bootstrap in wwwroot folder

本小妞迷上赌 提交于 2019-12-20 03:52:15
问题 recently I started learning ASP.Net core MVC. I always used bower to install packages for my projects in Visual Studio 2017. but now I want to use yarn. since it seems bower is deprecated. but I don't know how to use yarn to install bootstarp in wwwroot folder. for bower i used bower.json and it would install bootstarp automatically. I use "yarn add bootstrap@4.0.0-alpha.6 --dev" but it install it in node_modules in the project folder and I can't see it in the solution explorer, thanks 回答1:

rails assets:precompile Yarn executable was not detected in the system

元气小坏坏 提交于 2019-12-19 03:15:32
问题 I am using Linux 18 based on Ubunt 17.04. When I run rails assets:precompile I get the following message Yarn executable was not detected in the system When I follow the instruction for the installation like in this Post or on the Webpage, I install Yarn successfully, but rails keeps giving me the error I notice that node.js has system packages for Linux Mint up to version 17.2 , I tried to do all the instruction for the Yarn page and install manually node.js which was already installed in my

rails assets:precompile Yarn executable was not detected in the system

China☆狼群 提交于 2019-12-19 03:15:07
问题 I am using Linux 18 based on Ubunt 17.04. When I run rails assets:precompile I get the following message Yarn executable was not detected in the system When I follow the instruction for the installation like in this Post or on the Webpage, I install Yarn successfully, but rails keeps giving me the error I notice that node.js has system packages for Linux Mint up to version 17.2 , I tried to do all the instruction for the Yarn page and install manually node.js which was already installed in my

create-react-app build deploy on LAMP/XAMPP/WAMP

心不动则不痛 提交于 2019-12-18 15:54:33
问题 How to deploy the build on Apache WAMP/XAMPP server? I have an app created with create-react-app and I have two pages on this application When I execute yarn start or npm start it's working fine and all the pages are rendering properly on the URL navigation or button click I executed the build command npm run build It's generating all the static and index.html files on build folder. I moved this build folder content to www of wamp folder and execute on the url http://localhost its showing

When installing packages with Yarn, what does “incorrect peer dependency” mean?

本小妞迷上赌 提交于 2019-12-18 12:44:43
问题 I'm just cloned a repo, which recommends the use of Yarn to install dependencies. When I run yarn install , it seems to be okay, but it provides this warning: yarn install v0.20.3 [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... warning "sass-loader@4.0.2" has incorrect peer dependency "node-sass@^3.4.2". [4/4] 📃 Building fresh packages... ✨ Done in 77.59s. I've looked online to find out exactly what "has incorrect peer dependency" means. But all I

When installing packages with Yarn, what does “incorrect peer dependency” mean?

。_饼干妹妹 提交于 2019-12-18 12:43:57
问题 I'm just cloned a repo, which recommends the use of Yarn to install dependencies. When I run yarn install , it seems to be okay, but it provides this warning: yarn install v0.20.3 [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... warning "sass-loader@4.0.2" has incorrect peer dependency "node-sass@^3.4.2". [4/4] 📃 Building fresh packages... ✨ Done in 77.59s. I've looked online to find out exactly what "has incorrect peer dependency" means. But all I

Application generated with JHipster 4 returning blank page on 8080, but not on 9000

这一生的挚爱 提交于 2019-12-18 11:27:22
问题 I've create an application with JHipster v4. When I make a request on port 8080 it is returning a blank page. If I use yarn start , and I make a request to 9000 port, it is answering correctly. Any idea? 回答1: I had the same issue with JHipster application bringing up the blank page on port 8080 when ran with ./mvnw in dev mode. I was able to resolve this by running: yarn install && yarn webpack:build After it finishes, the application shows normally in dev mode on port 8080. 回答2: I had the

What is the difference between yarn.lock and npm's shrinkwrap?

北慕城南 提交于 2019-12-18 10:22:18
问题 Recently I tried installing my Node packages with Yarn. It works great and it's a lot faster than NPM. Yarn automatically generates yarn.lock . We already have NPM shrinkwrap ( npm-shrinkwrap.json ). Is there any difference between them? Does yarn.lock has any advantage over npm-shrinkwrap.json? 回答1: The yarn.lock file is quite similar to other package managers' lock files, especially Rust's Cargo package manager, which has Cargo.lock . The idea of these lock files is to represent a