Laravel 9 - Install Breeze - laravel-9

I have created a Fresh Laravel-9 Project, created a database in admin-sql and updated the .env file. After this, I ran following commands:
composer require laravel/breeze --dev
php artisan breeze:install
php artisan migrate
npm install
npm run dev
I then ran Laravel and registered a user. I then closed my project and closed all command prompt windows. Next time I ran my project and trid to login and got the following error
Did you forget to run npm install && npm run dev?".
I then ran npm run dev and a server started at 127.0.0.1 and then I was able to login.
My question is, everytime I open my project, do I have to run an additional server at 127.0.0.1 using npm run dev in addition to php artisan serve or am I doing something wrong?

When I used Laravel 9 for the first time, I had the same doubt.
It seems you do need to run it everytime.
But if you do not want to build your files again then you may use the build command
npm run build

Related

My changes made in Dashboard.vue aren't being saved (Laravel Jetstream Inertia.js)

This is my first day working with this so I'm not sure what's going on.
When I start up my laravel project and add jetstream(inertia.js) and make changes to my resources/js/Dashboard.vue file, I open my local server and go to /dashboard and those changes don't appear on the website.
Things I've tried:
Made sure it wasn't my development server because I was able to change welcome.blade.php
Ran npm run dev again.
Steps I made when I create the app:
1. ran laravel new ProjectName --jet
2. opened my project in VSCODE
3. ran npm install && npm run dev
4. Made changes to my Welcome.blade.php
5. Attempt at changing Dashboard.vue
When you start your application, just type the following in your terminal.
1. npm install
2. npm run dev
3. npm run prod
4. npm run watch
5. php artisan serve
And it should all work, for the question i had, all i used was steps. 1,2,4,5. But i ran into a problem later regarding something else and then ran npm run prod and it fixed.

Visual Studio Code - NPM not found when using NPM SCRIPTS

If I open the integrated terminal and run npm -v it works.
But, if I running it directly from NPM SCRIPTS it doesn't work.
MORE DETAIL AS REQUESTED IN COMMENT
// Edit by Fogmeister
I also have this problem, here is some more detail...
I have a test script defined in package.json...
When I run this script from the root folder command line using npm run test it works...
This script appears in the list of NPM Scripts in VS Code...
When I run from the NPM Scripts explorer it fails...
Even though it says it is running from the same folder.
Try doing, use dnf or apt-get
sudo apt-get/dnf install npm
The npm file should be in /usr/local/bin/npm. If it's not there, install node.js again with the package on their website.

Angular 5 not able to create simple project

I am new to angular, and starting with angular 5.
I have just installed node-v8.11.3-x64,
and run below commands :
npm install -g #angular/cli
ng -v & npm -v
and finally run below command :
ng new "hello-hello"
but getting below error
please help me to get rid of it.
For #fabi_K
For #fabi_k after cleaning cache
You probably have an issue by installing your dependencies. Just skip that part and run npm install -d und your generated project.
When you are behind a corporate proxy, ensure that your npm proxy settings are set correctly.

How to see the build version of a build project with npm

I know that my question gonna be quite stupid for the pro vue.js and Webpack. I'm not really use to it yet.
I have actually a little application with vue.js and webpack. I was developing and seeing the result by using the command : npm run dev
and looking at the local adress : http://localhost:8080/
Then, I have done a build version with : npm run build
So eveything is fine but now, I dont know how to see the final result locally. What I have to do or what I'm missing ?
Thank for your answer
You could use the http-server npm package:
yarn global install http-server
# Or
npm install -g http-server
then cd into your built folder and launch http-server. This should give you a url to go to.

Run a Vue.js project in server without " npm run dev " command?

After installing vue cli globally by running npm install -g vue-cli, I have installed all the modules in the project folder "myBlog" by running npm install and can run the project in my local environment by using npm run dev. But when I am going to move this project in the live server is this is the right way to run the batch program (npm run dev) continuously or there are other ways to run the project without running npm run dev continuously?
It's not Vue specific but you also should be able to run npm run build which generates production bundles in /dist subfolder of your project. You are supposed to copy this folder to the production server and configure the server so that it serves dist/index.html for every URL.
If you are using the "webpack", "webpack-simple" or "pwa" template there is a dedicated command for creating the production build, which allows a static hosting (with no need to run any npm process in the server):
npm run build
It will create a dist folder which content you can upload to the root of your server.
Some more info about:
"webpack" template:
https://vuejs-templates.github.io/webpack/commands.html#npm-run-build
"webpack-simple":
https://github.com/vuejs-templates/webpack-simple#webpack-simple
"pwa": https://github.com/vuejs-templates/pwa#whats-included
Very simple. To launch a VueJs project, you must type "npm run serve".