I am trying to install laravel and breeze. Everything goes fine up to npm install. But when I run npm dev it freezes and nothing else happens. Below is what it says when it stops:
VITE v3.0.9 ready in 1434 ms
➜ Local: http://127.0.0.1:5176/
➜ Network: use --host to expose
LARAVEL v9.25.1 plugin v0.5.4
➜ APP_URL: http://localhost
Please! How do I resolve this?
UPDATE:
After running npm build, npm run dev still freezes. Below is the code.
npm run build
> build
> vite build
vite v3.0.9 building for production...
✓ 119 modules transformed.
public/build/manifest.json 0.25 KiB
public/build/assets/app.c090eeea.css 186.93 KiB / gzip: 26.55 KiB
public/build/assets/app.aac2dc08.js 170.64 KiB / gzip: 57.15 KiB
amand#Amanda MINGW64 /c/laragon/www/patinoire
$ npm run dev
> dev
> vite
Port 5173 is in use, trying another one...
Port 5174 is in use, trying another one...
VITE v3.0.9 ready in 1043 ms
➜ Local: http://127.0.0.1:5175/
➜ Network: use --host to expose
LARAVEL v9.25.1 plugin v0.5.4
➜ APP_URL: http://localhost
try
npm run build
npm run dev
i think it will work
Follow these steps
Download Node.js installer from https://nodejs.org/en/download/
Install Node.js and NPM
Related
I recently created a new laravel 8 project using Breeze for the authentication and tailwind css. All worked perfectly when running npm run watch but once I run npm run prod I ran into errors. I noticed that the Tailwind docs mention that there are PostCSS issues so you need to unistall and run
npm install tailwindcss#npm:#tailwindcss/postcss7-compat #tailwindcss/postcss7-compat postcss#^7 autoprefixer#^9
I done that however every time I run npm run prod now the build quits at 98% and says
Additional dependencies must be installed. This will only take a moment.
Running: npm install postcss#^8.1 --save-dev --legacy-peer-deps
npm WARN browser-sync-webpack-plugin#2.2.2 requires a peer of webpack#^1 || ^2 || ^3 || ^4 but none is installed. You must install peer dependencies yourself.
Finished. Please run Mix again.
This auto updates PostCSS to 8.1 every time.
After that if I run npm run prod again it does the exact same message over and over.
I've tried removing the browsersync plugins and trying again but it still doesn't work.
Anyone ran into this or got a solution?
laravel-mix v6 now supports PostCSS8
According to tailwind docs, it suggests to use npm install tailwindcss#npm:#tailwindcss/postcss7-compat #tailwindcss/postcss7-compat postcss#^7 autoprefixer#^9
With the new Mix v6, run npm install tailwindcss#latest postcss#latest autoprefixer#latest
After this, npm run prod will run the way it should.
you must upgrade laravel mix using the following command
npm install laravel-mix#latest
As Digvijay mentioned above the new Mix v6 now supports PostCSS 8. So run:
npm install tailwindcss#latest postcss#latest autoprefixer#latest
After the when you run npm run prod you will still get this message:
Additional dependencies must be installed. This will only take a moment.
Running: npm install browser-sync browser-sync-webpack-plugin#2.2.2 --save-dev --legacy-peer-deps
npm WARN browser-sync-webpack-plugin#2.2.2 requires a peer of webpack#^1 || ^2 || ^3 || ^4 but none is installed. You must install peer dependencies yourself.
Finished. Please run Mix again.
To fix this just add sudo to the front of the npm command it ran:
sudo npm install browser-sync browser-sync-webpack-plugin#2.2.2 --save-dev --legacy-peer-deps
Now run npm run prod and it should work!
I have a laravel webpack Browsersync and thats worked on win7. I reinstall my windows and upgraded to win10 and now after i run npm run watch the server http://localhost:3000 keeps 'waiting for server'. So the webpack Browsersync is working but i have no server to check my application. What should be the problem?
you try this:
rm -rf node_modules
rm package-lock.json yarn.lock
npm cache clear --force
npm install
I keep getting a "module version mismatch" error when walking through the developer guide tutorial. I'm able to complete almost all of the tutorial (creating and testing my business network, deploying it to local fabric, interacting with it via the rest server), but get an error when running yeoman to create the sample angular app...
~/git/my-test-network$ yo hyperledger-composer:angular
Welcome to the Hyperledger Composer Angular project generator
? Do you want to connect to a running Business Network? Yes
? Project name: my-app
? Description: Commodity
? Author name: t
? Author email: t
? License: Apache-2.0
? Business network identifier: my-test-network
? Connection profile: hlfv1
? Enrollment ID: admin
? Enrollment secret: adminpw
? Do you want to generate a new REST API or connect to an existing REST API? Generate a new REST API
? REST server port: 4000
? Should namespaces be used in the generated REST API? Never use namespaces
events.js:160
throw er; // Unhandled 'error' event
^
Error: Failed to load connector module "composer-connector-hlfv1" for connection profile "hlfv1". Error: Module version mismatch. Expected 48, got 46.
at connectionProfileStore.load.then.e (/usr/local/lib/node_modules/generator-hyperledger-composer/node_modules/composer-common/lib/connectionprofilemanager.js:150:38)
I believe this is related to npm, but I have uninstalled/reinstalled/rebuild several times and the error persists
npm uninstall -g composer-cli
npm uninstall -g composer-rest-server
npm uninstall -g generator-fabric-composer
npm install -g composer-cli
npm install -g composer-rest-server
npm install -g generator-fabric-composer
npm uninstall -g yo
npm install -g yo
my setup ...
Ubuntu 16.04.1 LTS
docker --version Docker version 17.06.0-ce, build 02c1d87
docker-compose --version docker-compose version 1.8.0, build unknown
node --version v6.11.1
npm --version 5.3.0
npm -v composer-cli 5.3.0
npm -v composer-rest-server 5.3.0
npm -v generator-hyperledger-composer 5.3.0
npm -v yo 5.3.0
Please check the output from composer -v
You should be using generator-hyperledger-composer Above I see you installed the old version: npm install -g generator-fabric-composer
Can you please cd into the generated app and rm -r the node_modules directory, and then rerun npm install.
I have a fresh install of Laravel 5.4. I as well have the folowing versions installed on my Windows PC
node: 6.11.0
npm:5.0.3
I have already run npm install, however, when i run npm run watch, i get the following error
> # watch C:\xampp\htdocs\tu
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
10% building modules 1/1 modules 0 active
Webpack is watching the files…
95% emitting
ERROR Failed to compile with 2 errors 12:12:42 AM
These dependencies were not found:
* C:\xampp\htdocs\tu\resources\assets\js\app.js in multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss
* C:\xampp\htdocs\tu\resources\assets\sass\app.scss in multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss
To install them, you can run: npm install --save C:\xampp\htdocs\tu\resources\assets\js\app.js C:\xampp\htdocs\tu\resources\assets\sass\app.scss
I've searched the internet but cant seem to get it working. Any help is appreciated.
I was having the exact same issue but Leo_Kelmendi's solution didn't work for me.
Searching on GitHub, I found there is a bug in NPM 5.2.0 that affects Laravel Mix. Read more about it here.
I had to revert NPM to its previous version in order to get my assets compiling again:
$ sudo npm install -g npm#5.1.0
Then, I removed all installed modules:
$ rm -rf node_modules/
$ npm cache clear --force
$ rm -rf package-lock.json
Notice that clearing the cache may take a while.
And, finally, I reinstalled node deps and run the dev script:
$ npm install
$ npm run dev
Try to revert to this package.json. You can find it here:
https://github.com/laravel/laravel/blob/c1643bf0c59b6864fc55e09cce3bfafc67d29e2a/package.json
And try to run it again, also make sure, there's a node_modules/moment folder.
npm install works when run on my local machine and on codeship.io, but fails on heroku.
This seems to be an issue with the phantom npm package. It has happened on two separate projects simultaneously. Both works locally, on codeship and on my deployment server, but wont run on heroku.
Founder of Codeship here.
Have you tried setting the phantom npm package as a development dependency so it doesn't get installed on Heroku?