New to Laravel and I am having trouble getting bootstrap going with my project. I am not sure what I'm doing wrong.
I will give steps to see if anyone can repro and advise. Thanks in advance
I started with a fresh install of Ubuntu 22.04
1. Install PHP 8.1.2:
sudo apt install -y php php-common php-cli php-gd php-mysqlnd php-curl php-intl php-mbstring php-bcmath php-xml php-zip
2. Install Composer:
sudo apt install -y curl
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/bin --filename=composer
3. Create Laravel Project:
composer create-project laravel/laravel --prefer-dist laravel-bootstrap
cd laravel-bootstrap
4. Install Laravel/UI & Bootstrap
composer require laravel/ui
php artisan ui bootstrap
php artisan ui bootstrap --auth
npm install
npm run dev
When I run npm run dev, I get this message :
dev
vite
file:///var/www/laravel-bootstrap/node_modules/vite/bin/vite.js:7
await import('source-map-support').then((r) => r.default.install())
^^^^^
SyntaxError: Unexpected reserved word
at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18)
at async link (internal/modules/esm/module_job.js:42:21)
If I run php artisan serve and go to http://127.0.0.1:8000 I get the default Laravel page and it looks fine, but if I go to http://127.0.0.1:8000/login, I get a Missing Vite Manifest File error message
screenshot of error : https://i.postimg.cc/Njzn2wBp/Screenshot-from-2022-08-18-00-11-28.png
I had pretty same problem and found solution for me
here
Update npm and node versions first and install Breeze if you don't have it already.
Briefly what I've done after:
npm install --save-dev vite laravel-vite-plugin
npm install --save-dev #vitejs/plugin-vue
Then updated package.json:
"scripts": {
"build": "vite build"
}
And
npm run build
Hope it will help ;)
Related
I am new to CentOS and I am trying to install composer through the terminal. Unforently it keeps saying file not found.
My terminal command as root:
curl -sS https://getcomposer.org/install | php
and the output error is
bash: php: command not found
curl: (23) Failed writing body ( 0 !=7626)
have things changed with composer and the install process for centos or am I missing something?
You need to install PHP first before you can install composer.
Installing PHP with yum package management:
yum install php
You need to install PHP first on centos then you will be able to run your command
First, install php & php-cli
yum install php
yum install php-cli
and then run composer install
Read this article too
I've been trying to install laravel on Ubuntu 14.04. I finished all the steps, but when try to
laravel new mySite
the following message is deployed:
Crafting application...
sh: 1: composer: not found
Application ready! Build something amazing.
It's looks like some trouble with composer, but I don't know why. Composer seems to work, so, what is wrong? Thank you!
I got the same error.
I fixed it with simple symlink.
locate it. Run: # whereis composer
composer: /usr/local/bin/composer.phar
then create link: # sudo ln -s /usr/local/bin/composer.phar /usr/local/bin/composer
Thats it. All works.
If you run composer on shell, does it run? otherwise run:
sudo apt-get install curl php5-cli git
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
Then try again, maybe you could try the composer installation syntax:
composer create-project --prefer-dist laravel/laravel blog
To be sure composer is updated to the latest version and nothing is in cache run:
composer self-update
composer clear-cache
I still can't use laravel new, but I found what was happening with composer.
Laravel 5.3 needs php5.6 or higher, otherwise will run an older laravel version. I upgrade to php5.6 with this steps: https://www.dev-metal.com/install-setup-php-5-6-ubuntu-14-04-lts/
then run
composer create-project laravel/laravel ProjectName
and it's done!
I had this error in laravel executing Gulp command: "Babel's CLI commands have been moved from the babel package to the babel-cli package".
I was updating to laravel 5.3 doing again all the gulp stuff to compile css/js...
Solution was to update npm with this command:
sudo npm install npm -g
then
sudo rm -rf node_modules
sudo ppm install
and at last again
sudo gulp
I have installed the yii framework successfully.I have installed it via composer. The location of my folder is /var/www/yii-test/advanced/.
I have opened my terminal and executed the below command.
cd /var
cd www
php /var/www/yii-test/advance/advanced/yiic webapp myyii
after executing this I got the below error.
Could not open input file: /var/www/yii-test/advance/advanced/yiic
so what is the sequence of executing the command and is this right way to setup the yii.
myyii is the folder name where I will keep the my yii application.
Just run this command init or php init (I don't remember which) in the root path. In advance projects you have to start your environment.
You can directly follow the steps from Step-7 to Step 10.
1)install curl.
sudo apt-get install curl
2)install php5-cli package
sudo apt-get install php5-cli
3) install the php5-mysql package
sudo apt-get install php5-mysql
4) install php5-mcrypt package.
sudo apt-get install php5-mcrypt
5) activate php5-mcrypt package.
sudo php5enmod mcrypt
6) install php5-gd package
sudo apt-get install php5-gd
7) install Composer
curl -sS https://getcomposer.org/installer | php
8) install it globally
sudo mv composer.phar /usr/local/bin/composer
9)Move to your localhost web root folder
cd /opt/lampp/htdocs/
10)To install
a)basic template
composer create-project --prefer-dist yiisoft/yii2-app-basic
Type in url: localhost/yii2-app-basic/web/
b)advanced template
composer create-project --prefer-dist yiisoft/yii2-app-advanced advanced
Type in url: localhost/yii2-app-advanced/web/
Or, Check This Link Install Yii2 To Install.
Cheers !
I am Devolping a mobile application using ionic framework.
When I run the command ionic server, the it throws this error:
/deps/uv/src/unix/stream.c:494: uv__server_io: Assertion `events == 1' failed
Can you help?
This looks like an error with your Node. Try the following commands first to see if your errors get solved:
sudo npm install npm -g
sudo npm cache clean -f
sudo npm install node -g
This will update your NPM (Node.js' package manager) if not already updated.
If that won't work, I'd recommend a re-install:
sudo npm uninstall node
sudo apt-get purge npm
sudo apt-get install npm
sudo npm install node -g
Let me know if you face issues in the process.