php – Installing vue on new version of laravel7-ThrowExceptions

Exception or error:

I installed a vue on laravel7. But npm run dev gives this error:

@ development: cross-env NODE_ENV=development
node_modules/webpack/bin/webpack.js –progress –hide-modules
–config=node_modules/laravel-mix/setup/webpack.config.js

I installed cross-env, cleared cache, reinstalled node_modules, installed webpack, but they did not resolve my problem.

Full version of error:

events.js:174 throw er; // Unhandled 'error' event ^

Error: spawn node_modules/webpack/bin/webpack.js ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19) at onErrorNT (internal/child_process.js:415:16) at process._tickCallback (internal/process/next_tick.js:63:19) at Function.Module.runMain (internal/modules/cjs/loader.js:834:11) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3) Emitted 'error' event at: at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12) at onErrorNT (internal/child_process.js:415:16) [... lines matching original stack trace ...] at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ development: cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ development script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/alibek/.npm/_logs/2020-03-16T19_56_59_915Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ dev: npm run development npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ dev script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.lal

I resolved this probled:
npm install webpack-cli
npm install
npm install –dev or npm install –only=dev

How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *