What is the node_modules folder for in Laravel?
When you install laravel you will got a folder called vendor in your project. In this folder you have got all the pacakge dependencies of the laravel. And All those packages and their dependencies are listed in composer.json.
Same as node_modules folder also contains the package dependencies related to your javascript projects. So, that you can require it in your projects. And All those packages and their dependencies are listed in package.json.
In your case if you are not using vue.js,react.js then you don't need to run npm install . You can start building project without worrying about node_modules. You can even delete this folder and install it again using npm install when required.
The default install of Laravel includes a starter Vue.js application, as well as Webpack and Laravel Mix. These use Node.
If you don't intend to use these, you can safely remove node_modules
, the starter Vue app, and package.json
in your Laravel install.
They have nothing to do with PHPStorm.
edit: In recent versions of Laravel, the command
php artisan preset none
will remove the Vue starter app.