im working in a project using angularjs and laravel, but i have a bug i think in my application, im not sure since it happens sometimes, not always. Basically when i open or run my application are made some requests to some routes, but sometimes give me a 500 error, and than the error that is shown in the preview is:
RuntimeException in ApiServiceProvider.php line 88:
Unable to boot ApiServiceProvider, configure an API domain or prefix.
I searched online this error and didnt find much info related with this error, does someone have a idea what could it be?
Yes I have solved the problem, the thing is that you are missing configurations.
The way to solve it you have to make a copy of .env.example file and rename it to .env
Do not forget to change you database configurations.
The problem was missing domain or prefix. which is in your case is:
API_PREFIX=api
I`m sure that it should solve your problem.
Helpful hint turn on your debugging environment in config/app.php to 'debug' => env('APP_DEBUG', true)
so you can be more specific with error messages.
I had same problem even if API_PREFIX was set in my .env file.
Simple solution that I found after long struggle was to clear cache:
php artisan chache:clear
php artisan config:cache
Related
I want to upload my project to Vercel but i have a problem with the build, i am new in this, so i don't know what to do, please help me, the first pic is the error that i have in Vercel
I experienced the same error. My solution was to delete one file (it wasn't currently in use). It was impeding the page from being built and, then, deployed. Check your '/', '/404' and '/Store' files. Try to look for any importations you may be missing, and also look for errors with any of your routes, if you're using them, those can be quite tricky.
Also, feel free to share the code in those 3 files aforementioned.
To resolve this issue I got there to the link provided by vscode
https://code.visualstudio.com/docs/setup/linux#_visual-studio-code-is-unable-to-watch-for-file-changes-in-this-large-workspace-error-enospc
Ok, this, corrects the error, But when I restart the Linux and again open my React project,
I get the Same error.
max_user_watches file again gets the value of 8192 as no. of max files.
My react server is not starting due to this issue.
Then I again follow the same step of the link provided, this sometimes gets frustrating.
Any permanent Help I could get from you.
A workaround:
Just disable this built-in extension: TypeScript and JavaScript Language Features
After installing the module H5P, my site wouldn't load and only displayed "Error" The website encountered an error, please try again later
I had to manually disable the H5P modules in the database then clear the cache and a few minutes later the website started loading again. It also seems as if sub-domains couldn't load during this time.
Has anyone else experienced this?
After uninstalling and deleting the H5P module, it still shows on the page: admin/config/system/h5p but when the H5P link is clicked I get a Website encountered an error, please try again later error.
I can't seem to clear the cache via the site admin and I can't save panel pages. It says saved but when i try to access the page url, it says page not found.
Someone else said "I've had the same or similar issue. When I install, I just get a WSOD. I ended up using the missing module cleaner to get my site back to working normal after manually uninstalling it."
I've installed the module missing fixer module and when I enabled the module I got a "Website encountered an error, please try again later error." message but when I refresh the page, it shows the module is enabled.
However, when I click on "configure" from the module list page, it takes me to /admin/config/system with no option to configure the settings or actually use the module.
Should I be looking in the database for something that could fix this issue?
This issue was fixed by truncating every cache_ table in the database.
Typing the command "cake" in console shows no output, no errors or anything like that. It just prints about 4 blank lines.
Has anyone else experience this problem before and how did you fix it?
C:\xampp\htdocs\project\app>cake
C:\xampp\htdocs\project\app>
I have had similar problem a moment ago and I found the solution. the problem was not the path for me. I have turn on the debug from 0 to 2. and it shows some error instead of empty output and I try to fix the error (which was in the core.php) and it works now.
So try to debug it like me and fix the error.
Hope it helps.
cake is not directly available in app - while you are in the right folder you still need to call the cake command relative from there:
\app>.\Console\cake
Note that this syntax is unique to Windows
For UNIX use
\app>Console/cake
In case you are using an old app version or didnt bake your application with the Console folder (which you should, though), you can also call the cake core version of it relatively from the APP dir:
\app>..\lib\Cake\Console\cake
(WIN)
\app>../lib/Cake/Console/cake
(UNIX)
Either way the cake file needs to have sufficient execution rights (UNIX mainly) and PHP must be in the system env path. Then it will all work out of the box.
Run this command in Cake/Console folder. I think you are not running it in the right folder.
In this directory:
C:\xampp\htdocs\project\app>
type this command:
php Console/cake.php
which will output:
Current Paths:
-app: app
-working: C:\xampp\htdocs\project\app
-root: C:\xampp\htdocs\project
-core: C:\xampp\htdocs\project\lib
Changing Paths:
Your working path should be the same as your application path. To change your path use the '-app' param.
Example: -app relative/path/to/myapp or -app /absolute/path/to/myapp
....
Similar issue encountered where Console wasn't outputting anything after installing Cake via Composer instead of git clone - no error, just returning a blank line. To solve it I made a backup of app/ (mv app/ app.bak/) and then used vendor/bin/cake -app app bake to bake a brand new app/ folder. Once that process was complete running Console from app/Console/cake started working again. Then just moved my app.bak/ code back in place. I'm assuming over time the paths present or code in app/Console had become unworkable.
Bringing back in the old code I was able to narrow down the issue to using Apc as a cache engine. Reverting to $engine = 'File'; in core.php and bootstrap.php solved the problem and Console worked as expected.
I guess you are using a composer powered cakephp which has console command in Vendor folder. If so, try this ;
AppRoot/Vendor/bin/cake
or you may try with full path to fw;
PATH_TO_APP\Vendor\cakephp\cakephp\lib\Cake\Console\cake.bat
I am trying to import DebugKit and CakePHP is producing the following error: DebugKit.ToolbarComponent could not be found.
Right below it, it says:
Create the class ToolbarComponent below in file:
/Users/SomeUser/Sites/SomeProject/app/Plugin/DebugKit//Controller/Component/ToolbarComponent.php
If you notice though, there are two slashes between DebugKit and Controller for some reason, and that's obviously not a real directory. The server running PHP 5.4.17. I have followed the exact installation instructions listed here. Any suggestions?
I had the same problem and solved it by changing the permissions to 755 to folders within DebugKit.
When I encountered this problem, I realized I had a Plugin/DebugKit folder structure in my project's root, and under the app directory. The one under app was empty, save for a blank file called empty. Strange. I have no idea how this happened. (Perhaps from accidentally running composer as non-root?) I deleted app/Plugin/DebugKit, and moved the one from the project root into app. No more error.
DebugKit does not currently seem to be compatible with cakephp 3.0 even though it is the example in the documentation.
The latest version still seems to use the 2.x methods.
I will also submit a ticket regarding this to update their documentation to prevent confusion.
If there is something I missed regarding this issue and it is actually possible to install this, let me know.