adonis js cleans build folder every time you trigger a new build as a result public upload folder will be removed this created a lot of issue for me and Im trying diffrent methods to solve this.
Im not currently using github actions to build my project and I was wondering if it can help me on this matter by this order or somthing like this on every commit:
copy build/tmp folder
build project by running yarn build command
past the copied folder from step 1 back to build/tmp
for those who came here like me, I found the configuration. You can change local disk configuration.
/config/drive.ts
{ local: { root: Env.get('STORAGE_ROOT'), } }
In this case I created a variable in the .env with the absolute path
Terminal is giving me an issue where it prints "false"
Additionally, "false" shows up before the html view in the Laravel output.
I am running into this on codecourse's Classified's Site tutorial
Any idea how to remedy?
More detail:
I think what set this off was I changed the config/database.php for mysql from strict = true to false (have since changed back).
After changing mysql strict = true, I reloaded vagrant with provision on and did a migrate:reset and migrate then reseeded the database. Yet, when I run commands in terminal (eg. php artisan migrate), 'false' gets displayed on the next line before the migrations happen. and annoyingly, my website displays "false" in the top of the view, before the html doctype in the source gets written I took a look around the routes and views and cannot see how the false is creeping in there (especially since I changed it back to true!)
Any idea how to remedy, or suggestions for what to try?
See sample terminal Code below
vagrant#homestead:~/code/fresh$ php artisan migrate
falseMigrating: 2018_02_16_130447_create_listings_table
Migrated: 2018_02_16_130447_create_listings_table
vagrant#homestead:~/code/fresh$ php artisan make:controller Listing\ListingController
falseController created successfully.
vagrant#homestead:~/code/fresh$
Thank you Sam for the answer, I had accidentally put "false" ABOVE the start of the php declaration on the first line of my database config file
A PHP file can contain non-php and remain valid, i.e the following is valid:
false <?php echo '<h1>Hello World!</h1>'; ?>
That would produce the following:
false <h1>Hello World!</h1>
Laravel configuration files are simple PHP files that return an array, that file is included by the framework and the app configuration is populated from the values in the array. The behaviour you're seeing is indicative of a file within your application containing content that shouldn't be there, and based on what you were doing when the issue occured it's probably one of your configuration files.
Run the following command from your project root:
$ grep -r "false" config
Then review each instance of "false". You'll most likely find that at the top of your config/database.php file you've mistakenly placed false before the opening tag <?php.
For future reference, if you're using version control it is much easier to identify the cause of issues like this because you can step through every change you've made since the issue started. GitHub has a great desktop client that makes version control very easy :-)
I'm trying to enable vue-devtools in Google Chrome. But I cannot enable it. I'm using vue.js inside the Laravel application.
My server runs using php artisan serve command.
I was seeing the error message in this question's title and this solution worked for me:
Add Vue.config.devtools = true to the file where you create the Vue instance (main.js for me).
Note that, as mentioned in this answer, you need to put the Vue.config.devtools = true line before you create your store in order for the Vuex part of the devtools to work. If you're creating your Vuex store in a separate file (e.g. store.js), you may need to have the Vue.config.devtools = true line in both your main.js file as well as the store.js file.
Below is what the changes looked like in my project:
If the page uses a production/minified build of Vue.js, devtools
inspection is disabled by default so the Vue pane won't show up.
To make it work for pages opened via file:// protocol, you need to
check "Allow access to file URLs" for this extension in Chrome's
extension management panel.
I had to restart the chrome, and it worked :-)
If your using CDN; make sure your not using a production (minified) build of the library.
Use: https://unpkg.com/vue#2.4.4/dist/vue.js
Instead of: https://unpkg.com/vue#2.4.4/dist/vue.min.js
You might need to do Ctrl+Alt+I for it to show up the first time. (Source)
Updated Aug 2022
So apparently as #kissu said, the answer below causes the released code to be an unoptimized one. This might be different than what you want if you want to check production code while being able to check Vue Dev Tools.
Just be aware of it. Unless you don't mind checking the released code in an unoptimized bundle, then the following script is fine. If you don't like the Vue.config.devtools value being static, it might be time to consider env variables or something similar.
Here's how to setup Environtment Variables in Vue
Alternative answer for Vue CLI 3.x
Besides what #NathanWailes has said, this is an alternative which allows the Dev Tools to be available through scripts instead of writing it in your main Vue entry (which is usually main.js or index.js).
You can do this by simply adding this script to package.json
scripts: {
"start:dev": "vue-cli-service build --mode=development"
}
Explanation
This was because Vue.config.devtools are set to false by default in production mode as said by this GitHub Issue. But this has a work around, simply by using --mode=development flag provided in the documentation.
Then you can run using npm run start:dev and check the file in your dist/ folder! ;)
You may use the dev version of vue.js. For example get it here: https://unpkg.com/vue#2.3.2
When using Laravel just make sure you run the proper webpack for your environment for development . Running
npm run watch
should build Vue with debug mode on. Using
npm run production
minifies Vue for production. This will save you having to remember to toggle the debug mode when building for production.
For me Installing latest Vue dev tools - link and enabling 'Allow access to file URLs' in extension settings resolved the issue.
make sure you're running a non-production build of Vue.js. https://github.com/vuejs/vue-devtools/issues/62
Just add into vue.config.js:
module.exports = {
configureWebpack: {
devtool: 'source-map'
}
}
delete package-lock.json, node_modules, run npm i and VueJS Devtool will be working
you could try to set environment variable NODE_ENV to 'development'
(e.g. set NODE_ENV=development on Windows or export NODE_ENV="development" under Linux)
before launching Vue dev server.
In my case for Laravel 9 fresh installation, I forgot to run sail npm run dev.
If you're using Vite you can configure your environment directory via shared options. If you change that and have NODE_ENV set to production you'll receive this message when trying to inspect your app.
I created the whole responsive site in notepad - shop.html. I
can see its directory in rails. Put all my files in public folder of its rails app. Now I dont know how to load it in localhost:3000. How do i do that. Have configured everything. Rails server is running and It shows only the default index.html file. But when i write rails generate controller eshop. It says uninitialized constant welcome error.
PS: i m new to ruby.
All guides show how to create a new app but I couldnt find a way to load a html page already created in editor to load in browser using rails server.
Thanks in advance.
Since you generated a controller you need to put the content from your shop.html file into the /views/eshop/index.html.erb file
Open the routes file under config/routes.rb and change the following line
from:
root "welcome#index"
to:
root "eshop#index"
this way your app will point to the right file.
Subsequently you could just point the root to the shop.html file which I do not recommend. However you should definitely look into routing in rails and how it works.
In my config file I have:
# Site domain name (for sitemap.txt generation)
url : http://development.adityaraj.divshot.io#http://adityaraj.com
url : http://localhost:4000
When I run the server locally all looks good, even after build the _site folder/index.html also works well. But when I deploy it to divshot it is still using my local urls for asset files, hence the styling and images are all missing.
Also I am using boilerplate theme from: http://prettystack.github.io/jekyll-blog-starter/
How do I config it to work correctly for both the locations. And I do not want to manually change it every time I deploy. Please help.
Strangely it was a simple fix:
url : # just an empty setting takes care of this