I have a SilverStripe site with the following composer.json file:
{
"name": "silverstripe/installer",
"description": "The SilverStripe Framework Installer",
"require": {
"php": ">=5.3.2",
"silverstripe/cms": "3.2.1",
"silverstripe/framework": "3.2.1",
"silverstripe-themes/simple": "*",
"silverstripe/userforms": "*",
"silverstripe/widgets": "*",
"silverstripe/spamprotection": "*",
"silverstripe/blog": "dev-master",
"silverstripe/comments": "dev-master",
"silverstripe/lumberjack": "~1.1",
"undefinedoffset/sortablegridfield": "dev-master",
"axllent/silverstripe-version-truncator": "dev-master",
"unclecheese/betterbuttons": "dev-master",
"jonom/focuspoint": "dev-master",
"silverbusters/silverstripe-simplelistfield": "dev-master"
},
"config": {
"process-timeout": 600
},
"minimum-stability": "dev"
}
When I try to execute this script within Apple terminal, using php composer.phar install -dev, I receive the following error message:
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
Installation request for silverstripe/framework 3.2.1 -> satisfiable by silverstripe/framework[3.2.1].
jonom/focuspoint dev-master requires silverstripe/framework ^3.3 -> satisfiable by silverstripe/framework[3.3.0.x-dev, 3.3.x-dev, 3.x-dev, 3.4.x-dev].
Can only install one of: silverstripe/framework[3.3.0.x-dev, 3.2.1].
Can only install one of: silverstripe/framework[3.3.x-dev, 3.2.1].
Can only install one of: silverstripe/framework[3.x-dev, 3.2.1].
Can only install one of: silverstripe/framework[3.4.x-dev, 3.2.1].
Installation request for jonom/focuspoint dev-master -> satisfiable by jonom/focuspoint[dev-master].
This worked fine in early January for me. How should I modify my JSON file so this works correctly?
FocusPoint in "dev-master" version is only compatible with Silverstripe version 3.3. You have three possibilities:
install the version of 3.3 (not stable) of Silverstripe in order to make FocusPoint work.
don't install jonom/focuspoint
install an older version of jonom/focuspoint (ex: 1.1.1)
You just have to edit your composer.json file and change the versions numbers.
Related
I can't solve this issue, always going back to the same issue. When I run quasar new store stores it creates files that are no match to a current quasar documentation, containing files like for vuex store:
store
stores
- action.js
- getters.js
- index.js
- mutation.js
- state.js
- index.js
But expected to have pinia and all files related to pinia:
.
└── src/
└── stores/ # Pinia
├── index.js # Pinia initialization
├── <store> # Pinia store...
└── <store> # Pinia store...
This is my package.json:
{
"name": "client-profile",
"version": "0.0.1",
"description": "Lambda Client Profile App",
"productName": "Client Profile",
"author": "Branislav Papulin <branislav.papulin#nephelesolutions.com>",
"private": true,
"scripts": {
"lint": "eslint --ext .js,.vue ./",
"test": "echo \"No test specified\" && exit 0",
"build": "quasar build"
},
"dependencies": {
"#aws-amplify/ui-components": "^1.9.6",
"#quasar/app": "^3.3.3",
"#quasar/cli": "^1.3.2",
"#quasar/extras": "^1.14.1",
"aws-amplify": "^4.3.12",
"aws-sdk": "^2.1117.0",
"aws-xray-sdk": "^3.3.5",
"core-js": "^3.6.5",
"pinia": "^2.0.14",
"quasar": "^2.7.3"
},
"devDependencies": {
"#babel/eslint-parser": "^7.13.14",
"eslint": "^7.14.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-vue": "^7.0.0",
"eslint-webpack-plugin": "^2.4.0"
},
"browserslist": [
"last 10 Chrome versions",
"last 10 Firefox versions",
"last 4 Edge versions",
"last 7 Safari versions",
"last 8 Android versions",
"last 8 ChromeAndroid versions",
"last 8 FirefoxAndroid versions",
"last 10 iOS versions",
"last 5 Opera versions"
],
"engines": {
"node": ">= 12.22.1",
"npm": ">= 6.13.4",
"yarn": ">= 1.21.1"
}
}
And in node_modules I can see pinia is installed, but when I run quasar info I don't see it installed:
Operating System - Linux(5.4.0-100-generic) - linux/x64
NodeJs - 16.13.0
Global packages
NPM - 8.4.1
yarn - 1.22.4
#quasar/cli - 1.3.2
#quasar/icongenie - Not installed
cordova - Not installed
Important local packages
quasar - 2.7.3 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
#quasar/app - 3.3.3 -- Quasar Framework local CLI
#quasar/extras - 1.14.1 -- Quasar Framework fonts, icons and animations
eslint-plugin-quasar - Not installed
vue - 3.2.37 -- The progressive JavaScript framework for building modern web UI.
vue-router - 4.0.16
vuex - Not installed
electron - Not installed
electron-packager - Not installed
electron-builder - Not installed
Should be pinia included as well.
Same issue... tried updating quasar, cli, and pinia. I can even build a new clean quasar app with npm init quasar and select Pinia and it then creates a stores path but quasar new store storename still uses vuex... I can't even get vuex to uninstall (os x platform with vs code). quasar info still shows it.
The only solution I found is to add the path to stores in quasar.config.js:
sourceFiles: {
store: "src/stores/index",
},
I believe this has broken in the last couple months because I have been using pinia in my project without issue and then suddenly it couldn't find it in the "stores" path and was expecting index.js to be in a "store" directory instead.
Make sure to not only remove the vuex entry in the package.json but actually uninstall it.
In the project folder, call:
yarn: uninstall vuex
yarn remove vuex
npm: uninstall vuex
npm uninstall vuex
This will also remove it from the package.json.
After uninstalling I could also remove the sourceFiles entry in quasar.config.js.
Result in console:
quasar new store demo
App • Generated store: src\stores\demo.js
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.
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
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.
I have been fooling around with Node and npm Packages as CLI applications. I have a project with a package.json, all filled in correctly. When I run the application with different arguments via WebStorm, it all works fine. If I publish the npm package however... there are no dependencies... the npm site can't find one.. and when I install the CLI application, it fails running because yeah... the dependencies aren't pulled in...
This is my package.json
{
"name": "wmg",
"version": "0.0.8",
"description": "A Commandline Foolin around",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://github.com/Arvraepe/wmg.git"
},
"keywords": ["Stuff", "Foolin"],
"target": "main",
"preferGlobal": true,
"bin": {
"wmg": "wmg.js"
},
"author": "Arne Van Raepenbusch <arvraepe#gmail.com>",
"license": "ISC",
"devDependencies": {
"prompt": "^0.2.14",
"restify": "^3.0.3",
"underscore": "^1.8.3"
}
}
I tried running pakmanager deps, but that gave me this strange error
======================= WARNING =======================
Assuming browser mode by default is deprecated.
Include browserDependencies in your package.json
-- OR --
pakmanager -e browser build
In the next release of pakmanager, the node environment will be assumed as default
=======================================================
Targeted Environment: browser
[[[deps]]]
[ERROR] The following packages are `require`d, but not in the package, nor on npm:
wmg
pakmanager {}
======================= WARNING =======================
Assuming browser mode by default is deprecated.
Include browserDependencies in your package.json
-- OR --
pakmanager -e browser build
In the next release of pakmanager, the node environment will be assumed as default
=======================================================
Surely my package isn't supposed to be dependent on itself?
Can someone shed some more light on this?
I looked at your package, and as others have noted you have devDependencies listed but no dependencies. Typically devDependencies is for things like test frameworks, which you need to work on the package but not to use it. Both prompt and restify are used in your app and should be listed in a dependencies object instead of devDependencies.
Your package.json file contains no dependencies. Only devDependencies which npm assumes are required only for development (mocha for example) and are not required for installation.
If any of your devDependencies are actual user dependencies move them to dependencies.