How to change Yarn default packages directory

0 votes
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"
Nov 12, 2020 in Laravel by kartik
• 37,480 points
32 views

1 answer to this question.

0 votes

Hello @kartik,

You can create a .yarnrc file with the following content:

--modules-folder resources

This way every yarn command will have this parameter set.

Hope it helps!!

Thank You!!

answered Nov 12, 2020 by Niroj
• 82,540 points

Related Questions In Laravel

0 votes
1 answer

How Can I Set the Default Value of a Timestamp Column to the Current Timestamp with Laravel Migrations?

Hello, To create both of the created_at and updated_at columns: $t->timestamp('created_at')->default(DB::raw('CURRENT_TIMESTAMP')); $t->timestamp('updated_at')->default(DB::raw('CURRENT_TIMESTAMP on update ...READ MORE

answered Apr 2, 2020 in Laravel by Niroj
• 82,540 points
4,395 views
0 votes
1 answer

How to place the ~/.composer/vendor/bin directory in your PATH?

Hello @kartik, To put this folder on the ...READ MORE

answered Apr 2, 2020 in Laravel by Niroj
• 82,540 points
4,585 views
0 votes
1 answer

How to change value of a request parameter in laravel?

Hello @kartik, Use merge(): $request->merge([ 'user_id' => ...READ MORE

answered Aug 10, 2020 in Laravel by Niroj
• 82,540 points
681 views
+1 vote
1 answer

How to get public directory in laravel?

Hello @kartik, Use public_path() For reference: // Path to the project's ...READ MORE

answered Aug 10, 2020 in Laravel by Niroj
• 82,540 points
3,223 views
+1 vote
1 answer

How to make anchor tag with routing using Laravel?

Hey @kartik, First you have to go to ...READ MORE

answered Mar 18, 2020 in Laravel by Niroj
• 82,540 points
4,636 views
0 votes
1 answer

What is redirection in Laravel?

Named route is used to give specific ...READ MORE

answered Mar 18, 2020 in Laravel by Niroj
• 82,540 points
525 views
0 votes
1 answer

How to install Laravel via composer?

Hello, This is simple you just need to ...READ MORE

answered Mar 23, 2020 in Laravel by Niroj
• 82,540 points
396 views
+1 vote
1 answer

What are named routes in Laravel and How can specify route names for controller actions?

Hey @kartik, Named routing is another amazing feature of ...READ MORE

answered Mar 23, 2020 in Laravel by Niroj
• 82,540 points
5,247 views
0 votes
1 answer

How to change Laravel official name to any customize name?

Hey, You just need to go Laravel folder through ...READ MORE

answered Mar 17, 2020 in Laravel by Niroj
• 82,540 points
166 views
0 votes
1 answer

How can someone change the default database type in Laravel?

Laravel is configured to use MySQL by ...READ MORE

answered Mar 20, 2020 in Laravel by Niroj
• 82,540 points
1,079 views