I can not install npm to use laravel mix - php

I'm following a tutorial where they use laravel mix, and for that I must install node.js and then installi npm. But the problem is that when I execute the command npm install, the console returns the following errors:
What could be the problem?
VIEW IMAGE

Delete node_modules folder and run npm install again. Most times this fixes the issue

Related

Problems using assets with symfony

I have created a new project and I want to integrate a css sheet within my website
to add the css files I have done it as follows
line code image
and first of all I used the following commands
composer require symfony/webpack-encore-bundle
tells me to use one of the following commands
npm install
or
yarn install
but I have the following errors
npm install error 1 image
yarn install error 2 image
You should install node and yarn in your laptop
https://linuxize.com/post/how-to-install-node-js-on-ubuntu-18.04/

Php artisan and composer not working after git clone

EDIT: I'm not sure if my composer or my npm got corrupted. I still don't know the answer to this problem but what I did is I did a system restore. I did the steps below again and it magically worked.
All I did was
Git clone
Composer install
npm install
npm run dev
Then boom! I can't "php artisan serve", I can't even use "laravel new" (No errors message again).
What can be the solution for this?
Btw, even the apache on XAMPP and UWAMP are closing on its own. I already tried changing the port.
Package.json:
i once faced this issue. my problem was missing .env file. Make sure you have an .env file in your project and key in that file.

Laravel 6 user auth page not working properly

Today I installed laravel 6.x version for a new project.
I have PHP 7.3 in my system so laravel 6 was successfully installed.
Then I run this command to set the Auth UI for VueJS.
artisan ui vue —auth
along with this command:
composer require laravel/ui --dev
But when I checked my login page, it was just an html skeleton.
I checked over the internet and found a solution and tried to run this command,
npm run dev
But still am getting an ugly login page without css and Js files. I checked for CSS and JS files but found no solution.
Anyone please help and tell me how can I setup the front end scaffolding.
Thanks in advance
The command to implement Auth is as follows:
composer require laravel/ui
php artisan ui vue --auth
If your Login and Register page only shows plain HTML. And CSS is not loading properly then run this two command:
npm install
npm run dev
OR
Simply you've to follow this two-step.
composer require laravel/ui
php artisan ui:auth
This will solve your problem for sure!
Check if your npm install shows any deprecation error,
if shows then go to nodejs official site https://nodejs.org/en/ and download and install latest one in your system.
Then in your terminal run:
npm install
npm run dev
That's it.
In your laravel public folder, css and js should have shown after that npm run dev command.
Now your login and register page should be nice looking as expected.
Do one thing,
1) Create app.css and put into project_name/public/css/
2) Create app.js and put into project_name/public/js/
I believe it will work.
If not, make sure you have used these commands before.
npm install
npm run dev
Thanks.

Laravel - npm install - npm WARN deprecated gulp-util#3.0.8: gulp-util is deprecated

I want to start a project by Laravel and Reactjs.
For the first I installed a fresh Laravel project, and then run this commend in the project library
npm install
but I got this message and no any more progress.
npm WARN deprecated gulp-util#3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
how i can fix this?
Though it is not a permanent solution, Try yarn https://yarnpkg.com/en/docs/install
"yarn isntall" instead of "npm install"
then you can use "npm run dev" or whatever command you need.

Starting with Spark Laravel

I'm trying Spark and, after install it, I have two problems:
1.- When I try 'Log in' and 'Register' buttons, I get this. It is like if my web page with no style. Any idea what I am doing wrong?
2.- On the other hand, I'm following the Quickstart guide and I'm trying this:
"Once Spark is installed, make sure the NPM dependencies have been
installed via the npm install command, the gulp command has been
executed, and the database migrations have ran."
I'm running npm install in my Terminal and I'm getting this: -bash: npm: command not found.
I did some things with Laravel more than one year ago, and it was with no Homestead. Probably I'm doing something wrong... I'm pretty confusing.
Any help would be really appreciated! :)
You will need to install node and npm:
https://docs.npmjs.com/getting-started/installing-node
Once node is up and running you should be able to run "gulp" from within your application's main folder. This will generate (among other things) the CSS that you're currently missing.

Categories