php - Error running "npm install && npm run dev" when setting up Laravel 8
Get the solution ↓↓↓I'm trying to set up Laravel 8, and I'm getting this error. What do I need to do to fix it?
PS C:\wamp64\www\edularavel\Eduzone> php artisan ui vue --auth
Vue scaffolding installed successfully.
Please run "npm install && npm run dev" to compile your fresh scaffolding.
Authentication scaffolding generated successfully.
PS C:\wamp64\www\edularavel\Eduzone> npm install && npm run dev
At line:1 char:13
+ npm install && npm run dev
+ ~~
The token '&&' is not a valid statement separator in this version.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : InvalidEndOfLine
PS C:\wamp64\www\edularavel\Eduzone>
Answer
Solution:
You're running the commands in PowerShell, but the instructions assume you're running in a standard Unix shell.
In a Unix shell,a && b
means "runa
, and if it's successful, runb
".
So you can follow the instructions just by running the two separate commands yourself:
npm install
npm run dev
You might want to find some tutorials on basic command-line syntax, both to handle situations like this, and so that you don't accidentally run a command you didn't understand, and find you can't undo it.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: videoxxx
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.