Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove Bootstrap correctly from Laravel 5.4?

I try to start a Laravel 5.4 project without Bootstrap.

After installing Laravel, I edited the following files:

resources/assets/js/app.js

require('./bootstrap');

package.json

...
"devDependencies": {
"axios": "^0.15.3",
"bootstrap-sass": "^3.3.7",
"jquery": "^3.1.1",
"laravel-mix": "^0.7.2",
"lodash": "^4.17.4",
"vue": "^2.1.10"
},
...

I've got the following error:

ERROR Failed to compile with 1 errors error in ./resources/assets/js/app.js

SyntaxError: /Users/.../package.json: Error while parsing JSON - Unexpected end of JSON input at JSON.parse () @ multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss

Any suggestions?

like image 391
Giregar Avatar asked Feb 13 '17 22:02

Giregar


People also ask

Can I use bootstrap with laravel?

Introduction. While Laravel does not dictate which JavaScript or CSS pre-processors you use, it does provide a basic starting point using Bootstrap, React, and / or Vue that will be helpful for many applications.

How do I know my bootstrap version in laravel?

You can have a look at the default scaffolding by running php artisan make:auth command in your project terminal / command line. To check the current version of Bootstrap that your laravel project is using. Go to the package. json file which is located in the project root directory.


1 Answers

By default, Laravel 5.4 ships with Bootstrap and Vue.js scaffolding, but not everyone wants to use either of those technologies. With Laravel 5.5 you can run this if you don’t want any scaffolding to be generated out of the box by Laravel:

php artisan preset none
like image 184
Dunsin Olubobokun Avatar answered Oct 02 '22 13:10

Dunsin Olubobokun