sometimes we have to face some error while working Laravel and Vuejs in phpstorm editor and here some problem and solutions will represent to solve these issues
laravel vuejs phpstorm problems solutions
- If the import does not work in phpstorm editor , then Go to editor's file/setting/Languages & Frameworks/javascript/ecm6 select
- run in the terminal following line
npm install --save-dev babel-preset-es2015
- run in the terminal following line
npm install --save-dev babel-cli
Go to Settings / Languages & Frameworks / JavaScript and set the "JavaScript language version" to "ECMAScript 6"
in the terminal run following line
composer require pusher/pusher-php-server
- editing cross-env path will fix the problem. Change cross-env to node node_modules/cross-env/dist/bin/cross-env.js in package.json like this:
- suppose the following blue color line was before cross-env .i just change the path
- =====>>>>>Use node node_modules/cross-env/dist/bin/cross-env.js instead of cross-env