Laravel Vuejs phpStorm Editor some Problem solutions

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
in .package.json "scripts": {  "dev": "npm run development",  "development": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",  "watch": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",  "watch-poll": "npm run watch -- --watch-poll",  "hot": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",  "prod": "npm run production",  "production": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" },

Share with:

Comments are closed.