How to solve kartik\dialog\Dialog not found in yii2? - yii2

I can run controller in development correctly but I facing error kartik\dialog\Dialog not found in production
like thise picture
Why this thing happen?
How I can check it? in Vendor folder maybe.
and How to solve it?
Here is my composer.json
{
"name": "vendor/myweb",
"description": "Description of project myweb.",
"authors": [
{
"name": "Administrator",
"email": "developer1#myweb.com"
}
],
"require": {
"kartik-v/yii2-dialog": "*"
}
}
Thanks in advance.

Check in vendor for this, if it does not exist, go to point 2.
Add this line to require section in project-directory/composer.json file
"kartik-v/yii2-dialog": "*"
Then run in project directory command:
composer update

I hope you found the answer by now !
IF NOT:
I have struggled with this problem long enough to feel desperate :)
here's what I ended up doing:
1- install Dialog using composer : composer.phar require kartik-v/yii2-export "*
if it gives these errores :
Problem 1
- kartik-v/yii2-dialog dev-master requires bower-asset/bootstrap3-dialog ~1.34 -> no matching package found.
- kartik-v/yii2-dialog v1.0.1 requires bower-asset/bootstrap3-dialog ~1.34 -> no matching package found.
- kartik-v/yii2-dialog v1.0.0 requires bower-asset/bootstrap3-dialog ~1.34 -> no matching package found.
- kartik-v/yii2-dialog 1.0.x-dev requires bower-asset/bootstrap3-dialog ~1.34 -> no matching package found.
- Installation request for kartik-v/yii2-dialog #dev -> satisfiable by kartik-v/yii2-dialog[dev-master, 1.0.x-dev, v1.0.0, v1.0.1].
You need to run this command: composer global require "fxp/composer-asset-plugin:^1.2.0"
it rebuild dependencies and set jquery libraries to match with the ones required by Kartik Dialog. Good luck

Related

The required JS dependency "readable-stream/writable.js" is not available, it was required by "node_modules/stream-browserify/index.js"

I am getting this error when trying to build a Clojurescript project with shadow-cljs. I've tried looking for syntax errors as described here but I can get the same the error with a single line and a single import although not all imports cause the same error.
This compiles:
(ns campfire.core)
(defn init [] (println "ok"))
This doesn't:
(ns campfire.core
(:require ["bugout" :as b]))
(defn init [] (println "ok"))
The output from the above example is:
shadow-cljs - config: /home/ru/Projects/campfire/shadow-cljs.edn
shadow-cljs - HTTP server available at http://localhost:3000
shadow-cljs - server version: 2.11.18 running at http://localhost:9630
shadow-cljs - nREPL server started on port 8777
shadow-cljs - watching build :frontend
[:frontend] Configuring build.
[:frontend] Compiling ...
[:frontend] Build failure:
The required JS dependency "readable-stream/writable.js" is not available, it was required by "node_modules/stream-browserify/index.js".
Dependency Trace:
campfire/core.cljs
node_modules/bugout/index.js
node_modules/bs58check/index.js
node_modules/create-hash/browser.js
node_modules/cipher-base/index.js
node_modules/stream-browserify/index.js
Searched for npm packages in:
/home/ru/Projects/campfire/node_modules
See: https://shadow-cljs.github.io/docs/UsersGuide.html#npm-install
package.json
{
"name": "campfire",
"version": "0.0.1",
"private": true,
"scripts": {
"build": "shadow-cljs release frontend"
},
"devDependencies": {
"shadow-cljs": "2.11.18"
},
"dependencies": {
"bugout": "^0.0.10",
"webtorrent": "^0.114.1"
}
}
shadow-cljs.edn
{:source-paths
["src/dev"
"src/main"
"src/test"]
:dependencies
[]
:dev-http {3000 "public"}
:nrepl {:port 8777}
:builds
{:frontend
{:target :browser
:modules {:main {:init-fn campfire.core/init}}}}}
I've seen similar build errors that were fixed by clearing .shadow-cljs etc and rebuilding but nothing like that seems to be helping. I'm new to shadow so apologies if this is something obvious. Does anyone have any idea what's going on here?
Update
So it looks like what's happening is that stream-browserify 2.0.2 requires readable stream ^2.0.2 which npm installs in the nested node_modules folder. Elsewhere readable-stream 3.6.0 is being installed in top level node_modules. Shadow is trying to resolve writer.js against the 3.6.0 version of readable stream instead of the 2.0.2 version.
Confusingly though, stream-browserify isn't a dependency of cipher-base as given in the dependency trace but of node-libs-browser which is itself a dependency of shadow-cljs.
Is it possible that this is a bug in shadow or is it expected behaviour?
Update 2
I've created an example repo that replicates what I'm seeing as simply as I can here.
Did you actually install the shadow-cljs dependency in the project? Does the directory node_modules/shadow-cljs exist?
I see it listed in devDependencies so it should be installed but it might not be if you never actually called npm install in the project or npm is set to production mode which won't install devDependencies. All of this is part of the node-libs-browser package which seems to be missing as well and should have been installed due to being a dependency of shadow-cljs.
Based on the link in your first error message, it says to npm install whatever's missing.
If you didn't run npm install, that by itself will install what's in your package.json.
If that's not the issue, then npm i readable-stream may help.

Cloud Function Build Failed

I just changed two lines of code in the Google cloud functions source code using inline statement, the two lines of code involve parsing date string using datetime library, no updates to anything else. This same deployment has been working for more than a year now.
All of a sudden I get two errors -
Error 1 -
(gcloud.functions.deploy) OperationError: code=3, message=Build
failed: {"error": {"canonicalCode": "INTERNAL", "errorMessage":
"pip_install_from_wheels had stderr
output:\n/opt/python3.7/bin/python3.7: No module named pip\n\nerror:
pip_install_from_wheels returned code: 1", "errorType":
"InternalError", "errorId": "ECB5F712"}}
Resolved that by removing pip from requirements.txt (again not sure why this is a problem now and not for over a year)
If I address 1, I get the following error -
Error 2 -
(gcloud.functions.deploy) OperationError: code=3, message=Build
failed: {"error": {"canonicalCode": "INTERNAL", "errorMessage":
"gzip_tar_runtime_package gzip /tmp/tmpGLHQx9.tar -1\nexited with
error [Errno 12] Cannot allocate memory\ngzip_tar_runtime_package is
likely not on the path", "errorType": "InternalError", "errorId":
"2A1581FF"}}
Memory is already at 2048 and nothing changed other than the two lines of code above.
Let me know if this has been happening and what is the resolution.
It looks like this has to do with packages than anything else. I deployed a dummy function and added each package from requirements.txt until it failed. It turns out the problem packages were
a. gpflow
b. tensorflow
Last deployment with these packages was successful as of Feb 20. Not sure why I can't install them without those errors anymore. regardless, tried using the versions that would have been consistent with Feb 20 timeline with no luck. So refactored my code and removed all the functionality that was using that and deployed successfully.
Request to Google Cloud Folks : Why this behavior ? Also "Invalid ARGUMENT" in logs (Stackdriver or google cloud logging whatever you call it) is misleading.
The first error, as explained in this post, is due to pip being defined in your requirements.txt file. Specifying pip as a dependency for the function causes message to appear. You did the right thing by removing it from the requirements.txt file.
The second error usually appears if the number of files or the size of the content that is being uploaded is too big and the instance used to deploy your code runs out of memory. You perhaps were using too many dependencies or static files, as explained here.

Cannot Upgrade Yii2 Version Via Composer

I'm trying to update my yii2-basic app version because of what I think is its incompatibility with my new XAMPP (PHP 7.4.1).
This is how I did it:
composer self-update
composer global require "fxp/composer-asset-plugin:^1.4.1" --no-plugins
composer require "yiisoft/yii2:~2.0.14" --update-with-dependencies
This is how it shows in command window:
./composer.json has been updated
The "extra.asset-installer-paths" option is deprecated, use the "config.fxp-asset.installer-paths" option
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: remove phpunit/phpunit 5.7.x-dev
- Conclusion: remove sebastian/recursion-context 3.0.x-dev
- Installation request for phpunit/phpunit (locked at 5.7.x-dev) -> satisfiable by phpunit/phpunit[5.7.x-dev].
- Conclusion: don't install sebastian/recursion-context 3.0.x-dev
- phpunit/phpunit 5.7.x-dev requires sebastian/object-enumerator ~2.0 -> satisfiable by sebastian/object-enumerator[2.0.0, 2.0.1, 2.0.x-dev].
- sebastian/object-enumerator 2.0.0 requires sebastian/recursion-context ~2.0 -> satisfiable by sebastian/recursion-context[2.0.0, 2.0.x-dev].
- sebastian/object-enumerator 2.0.1 requires sebastian/recursion-context ~2.0 -> satisfiable by sebastian/recursion-context[2.0.0, 2.0.x-dev].
- sebastian/object-enumerator 2.0.x-dev requires sebastian/recursion-context ^2.0 -> satisfiable by sebastian/recursion-context[2.0.0, 2.0.x-dev].
- Can only install one of: sebastian/recursion-context[2.0.0, 3.0.x-dev].
- Can only install one of: sebastian/recursion-context[2.0.x-dev, 3.0.x-dev].
- Installation request for sebastian/recursion-context (locked at 3.0.x-dev) -> satisfiable by sebastian/recursion-context[3.0.x-dev].
Installation failed, reverting ./composer.json to its original content.
I tried these lines too but none of them worked:
composer require "yiisoft/yii2:2.0.14" --update-with-dependencies
composer require "yiisoft/yii2:~2.0.14"
Simply update your composer.json like this:
....
"require": {
"php": ">=5.6.0",
"yiisoft/yii2": "~2.0.14",
....
"require-dev": {
"codeception/codeception": "*",
We change the version of Yii2 minimum at 2.0.14 and yii2-codeception directly to codeception.
And don't forget to update you bower and npm asset config to newer composer configuration. Newer configuration looks like this.
"config": {
"vendor-dir": "vendor",
"process-timeout": 1800,
"fxp-asset":{
"installer-paths": {
"npm-asset-library": "_protected/vendor/npm",
"bower-asset-library": "_protected/vendor/bower"
}
}
},
and delete "asset-installer-paths" in "extra" parameter.
I found the solution.
I update the yii2 app by editing composer.json file, then running composer update on my command line.
Then somehow it worked.

Symfony 2.8 - Ivory Google Maps Bundle - Unrecognized option “api_key” under “ivory_google_map”

I have followed master documentation and tried to download it's version of bundle by running:
$ composer require egeloen/google-map-bundle
But unfortunatelly it downloaded 2.2 version of a bundle. I would think that this is correct version, but it is not. When I follow the documentation further I get an error in configuration after adding this to config.yml:
ivory_google_map:
api_key: "%api_key%"
Error says:
Unrecognized option “api_key” under “ivory_google_map”
Here creator says:
Let me explain your issue, when refering to https://github.com/egeloen/IvoryGoogleMapBundle/blob/master/Resources/doc/service/distance_matrix.md#api-key you're refering to dev-master doc whereas if you're using the 2.2.1 version, you should use: https://github.com/egeloen/IvoryGoogleMapBundle/blob/2.2.1/Resources/doc/usage/services/distance_matrix/distance_matrix.md
Unfortunatelly for you, the api key support has only been added on
master, so if you want to take benefit of it, you will need to
upgrade.
Okay so I am 100% sure that documentation installation I followed downloaded wrong version and I have to upgrade it. But how?
I tried running:
$ composer require egeloen/google-map-bundle dev-master
And I got an error:
Problem 1
- Installation request for egeloen/google-map-bundle dev-master -> satisfiable by egeloen/google-map-bundle[dev-master].
- egeloen/google-map-bundle dev-master requires egeloen/google-map ^2.0#dev -> satisfiable by egeloen/google-map[2.0.x-dev] but these conflict with your requirements or minimum-stability.
^2.0#dev does not solve my problem either. Please can anyone help? I cannot find any articles according this problem.
Composer has an option called minimum-stability that is set by default to stable. This means that when you run composer install or composer update, composer will only accept properly tagged versions.
If you want to use the dev-master of a vendor, you will have to set the minimum-stability option to dev in your composer.json :
{
"name": "myproject",
...
"require": {
...
},
"require-dev": {
...
},
"minimum-stability": "dev",
...
}
Be aware that this could lead to non-stable versions of vendors being installed in your project, so this is to avoid when you can. You can also prevent this by setting the version of your vendors to be sure a specific tag will be used, but then you would have to check your vendors update manually.

Why rasqal configuration can't recognize the already raptor library on cygwin?

I am trying to install rasqal 0.9.20 library http://librdf.org/rasqal/ onto a windows 7 machine with cygwin.Earlier i have successfully installed the raptor-2.2.0 library http://librdf.org/raptor/ and i can verify this with the rapper tool was created after the installation(./configure , ./make ,/make install)
The error that i am getting from the configuration of rasqal is :
./configure --enable-raptor2
...
checking for raptor... configure: error: Raptor2 is not installed - see http://librdf.org/raptor/ to get a version newer than 1.9.0
I can't find a way to fix it. The code from the cofigure file that handles this flag is the below :
11840 # raptor is REQUIRED despite the checking here
11841 RAPTOR_MIN_VERSION=1.4.19
11842 RAPTOR_MAX_VERSION=1.8.99
11843 RAPTOR2_MIN_VERSION=1.9.0
11844
11845 raptor2=no
11846 # Check whether --enable-raptor2 was given.
11847 if test "${enable_raptor2+set}" = set; then :
11848 enableval=$enable_raptor2; raptor2="$enableval"
11849 else
11850 raptor2="no"
11851 fi
Raptor 2.0.0 uses only pkg-config to provide configuration information, raptor-config was removed. The same applies to rasqal itself, the rasqal-config program will go away at some point. The --enable-raptor2 option to rasqal and librdf was for testing the beta raptor2, and it has been removed from rasqal 0.9.22 and librdf GIT head.
Set PKG_CONFIG_PATH to include the correct path:
env PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure
Another method, if available on your system, is to define the environment variable in /etc/environment:
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig