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,520 points
746 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,840 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,840 points
12,098 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,840 points
24,142 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,840 points
16,632 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,840 points
27,586 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,840 points
23,012 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,840 points
2,995 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,840 points
2,918 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,840 points
44,696 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,840 points
3,057 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,840 points
6,788 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP