Mopa Bootstrap bundle failing to install - netbeans

I get this error while trying to install the Mopa bootstrap bundle through command line:
"C:\ProgramData\ComposerSetup\bin\composer.bat" require
mopa/bootstrap-bundle ^3.0
Error:
installation failed reverting ./composer.json to its original content
mopa
require [--dev] [--prefer-source] [--prefer-dist] [--no-progress]
[--no-suggest] [--no-update] [--no-scripts] [--update-no-dev]
[--update-with-dependencies] [--ignore-platform-reqs]
[--prefer-stable] [--prefer-lowest] [--sort-packages]
[-o|--optimize-autoloader] [-a|--classmap-authoritative]
[--apcu-autoloader] [--] []...
Im lost since I`m not getting any explanation of what failed.

So listen here, I have a solution for you. As I see that you are working with composer I'll teach you how to do it.
First you must change your "composer.json" file in your project, adding in "require" section:
"require": {
...
"mopa/bootstrap-bundle": "*",
"twbs/bootstrap": "*",
"knplabs/knp-menu-bundle": "*"
}
(NOTE: "knplabs/knp-menu-bundle": "*" is recommended to put as well when you use twbs).
And then add this repository in the json:
"repositories": [
{
"type": "package",
"package": {
"version": "2.2.1",
"name": "twitter/bootstrap",
"source": {
"url": "https://github.com/twitter/bootstrap.git",
"type": "git",
"reference": "master"
},
"dist": {
"url": "https://github.com/twitter/bootstrap/zipball/master",
"type": "zip"
}
}
}
]
Save and finally, you should execute your composer update(dev) command.
Hope it works!

Related

UNABLE_TO_GET_ISSUER_CERT_LOCALLY while trying to install Bower

I am trying to install bower according to the material provided by Microsoft for their azure extensions widgets sample (https://github.com/microsoft/vsts-extension-samples).
Here's what the bower.json looks like:
{
"name": "widgets",
"homepage": "https://github.com/Microsoft/vso-extension-samples",
"description": "",
"main": "",
"moduleType": [],
"license": "MIT",
"private": true,
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"vss-web-extension-sdk": "^1.95.2"
}
}
However, despite whatever I've tried I'm unable to by-pass or proceed while getting the following local issuer certificate error:
bower vss-web-extension-sdk#^1.95.2UNABLE_TO_GET_ISSUER_CERT_LOCALLY Request to https://registry.bower.io/packages/vss-web-extension-sdk failed: unable to get local issuer certificate

Parse error Unexpected token '�' at 1:1 ��{ on flutter app when running firebase deploy

encounter the below message when trying to firebase deploy from root project
Error: Parse Error in ...\firestore.indexes.json
Unexpected token '�' at 1:1
��{
I have a flutter app, upon which I also have a functions folder. Below is the file position:
AppFolder
functions
.eslintrc.js
index.js
package.json
etc
lib
files relative to flutter app
test
test files relative to flutter app
web firestore.indexes.json
firebase.json
etc
I am running on windows 11 in a newly built pc (so maybe sth is missing?), other devs are running on mac, I have changed the EOF sequence to LF on the 3 files of the functions folder, I have also run these two commands inside the functions folder
npm install firebase-functions#latest firebase-admin#latest --save
npm install -g firebase-tools
npm version is 8.1.2
node version is v16.13.1
firestore.indexes.json is:
{
"indexes": [
{
"collectionGroup": "something1",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "created",
"order": "DESCENDING"
},
{
"fieldPath": "something2",
"order": "DESCENDING"
}
]
},
{
"collectionGroup": "something3",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "something4",
"order": "ASCENDING"
},
{
"fieldPath": "something5",
"order": "DESCENDING"
}
]
}
],
"fieldOverrides": []
}
.elslint.js is
module.exports = {
"root": true,
"env": {
es6: true,
node: true,
},
"extends": [
"eslint:recommended",
"google",
],
"rules": {
quotes: ["error", "double"],
},
"parserOptions": {
"ecmaVersion": 2020,
},
};
and package.json is
"name": "functions",
"description": "Cloud Functions for Firebase",
"scripts": {
"lint": "eslint .",
"serve": "firebase emulators:start --only functions",
"shell": "firebase functions:shell",
"start": "npm run shell",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
},
"engines": {
"node": "14"
},
"main": "index.js",
"dependencies": {
"axios": "^0.24.0",
"device-detector-js": "^3.0.0",
"firebase": "^9.2.0",
"firebase-admin": "^10.0.1",
"firebase-functions": "^3.16.0"
},
"devDependencies": {
"eslint": "^8.1.0",
"eslint-config-google": "^0.14.0",
"firebase-functions-test": "^0.3.3"
},
"private": true
}
Please keep in mind that in an older pc running windows 10 and I can deploy by changing only to the LF and running the above commands.
Just try to make a new text file and copy the content of generated file inside the new one. Then override the new file with firestore.indexes.json
Its obvious that the generated json file has some formatting problem.
I recently had this problem and found that it was resolved by changes to the firebase.json file:
Seek "predeploy":
Delete the code so that the outcome is "predeploy": []
After this, run the firebase deploy function again, and everything should be fine.
Thank you to Max for sharing this solution with me : )

Add github repository to my composer project

I like to create a new composer project. I will include code, that is not on packagist. It is a github repository. Concretely I like to include this release.
https://github.com/joomla/joomla-cms/releases/tag/4.0.0-alpha12
I expected with this composer.json to fetch the release 4.0.0-alpha12:
{
"name": "vendor/my_joomla_website",
"description": "Testing to install joomla with extensions via composer",
"type": "project",
"license": "GNU",
"authors": [
{
"name": "vendor",
"email": "myemail"
}
],
"repositories": [
{
"type": "git",
"url": "https://github.com/joomla/joomla-cms.git"
}
],
"require": {
"joomla/joomla-cms": "dev-4.0-dev#4.0.0-alpha12"
}
}
But the command comoser install did not run to the end. This is my message
composer install
Loading composer repositories with package information
[Symfony\Component\Process\Exception\ProcessTimedOutException]
The process "git clone --mirror 'https://github.com/joomla/joomla-cms.git' '/home/astrid/.composer/cache/vcs/htt
ps---github.com-joomla-joomla-cms.git/'" exceeded the timeout of 300 seconds.
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...
In the end I have a vendor directory in my project folder. The content of the github repository is not there.
What do I have to do if I want to add code - hosted on github - to my Composer project?
Update
I just changed my composer.json to
{
"name": "astrid/my_joomla_website",
"description": "Testing to install joomla with extensions via composer",
"type": "project",
"license": "GNU",
"authors": [
{
"name": "vendor",
"email": "myemail"
}
],
"repositories": [
{
"type": "package",
"package": {
"name": "joomla/joomla-cms",
"version": "4.0.0-alpha12",
"source": {
"type": "git",
"url": "git://github.com/joomla/joomla-cms.git",
"reference": "4.0-dev"
},
"dist": {
"url": "https://github.com/joomla/joomla-cms/releases/download/4.0.0-alpha12/Joomla_4.0.0-alpha12-Alpha-Full_Package.zip",
"type": "zip"
}
}
}
],
"require": {
"joomla/joomla-cms": "dev-4.0-dev#4.0.0-alpha12"
}
}
Now I get this error.
composer install
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
- The requested package joomla/joomla-cms dev-4.0-dev#4.0.0-alpha12 exists as joomla/joomla-cms[4.0.0-alpha12] but these are rejected by your constraint.
What am I doing wrong? I haven't assigned any dependencies or restrictions yet.
I'm not sure what exactly causes your "rejected by your constraint" exception, but I'm guessing it's because you're using the branch#ref version requirement which the docs say isn't actively supported. I think you could rather just use the 4.0.0-alpha12 tag since a tag isn't tied to a branch.
To fix your first issue, change your repository type to vcs (or github). Composer will detect the the repository is a Github repository and will then use the Github API to fetch the correct version of the package. The joomla-cms repository looks really big so it will probably take longer than the allowed 300 seconds to clone.
"repositories": [
{
"type": "vcs",
"url": "https://github.com/joomla/joomla-cms.git"
}
]
For your second issue, set your version to 4.0.0-alpha12:
"require": {
"joomla/joomla-cms": "4.0.0-alpha12"
}
The 4.0.0-alpha12 version of joomla-cms requires a dev version of joomla/application (joomla/application[2.0.x-dev]) so you would have to set your package's minimum stability to dev:
"minimum-stability": "dev",

Composer create-project always fails with the project I created

I have this project on Github and Packagist:
https://github.com/gitraffa/framework
https://packagist.org/packages/gitraffa/framework
I want to use this as a deploy app, so, when I need to start a new project I just go to the cmd and type composer create-project gitraffa/framework --prefer-distand it should automatically create the folder and inser the files. But it isn't working(I always get something saying that a stable version could not be found). Am I doing something wrong or can't this be done?
Here is my composer.json file:
{
"name": "gitraffa/framework",
"description": "A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust Web applications - fast!",
"homepage": "http://rafaelmsantos.com/",
"license": "GPL-3.0",
"authors": [
{
"name": "Rafael Santos",
"email": "dev.rafael#mail.com",
"homepage": "http://rafaelmsantos.com"
}
],
"require": {
"php": ">=5.3.6",
"psr/log": "~1.0"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/gitraffa/framework"
}
],
"extra": {
"branch-alias": {
"dev-master": "1.0.0"
}
}
}
Composer by default installs only tagged versions (last stable that meets condition).
The error message can be fixed by:
using #dev tag, like: composer create-project gitraffa/framework:#dev --prefer-dist
tagging your package

symfony propel:form:generate throws ErrorException

I work with symfony-standard 2.1
my composer.json file:
{
"name": "xxx",
"description": "xxx",
"autoload": {
"psr-0": {
"": "src/"
}
},
"minimum-stability": "dev",
"authors": [
{
"name": "xxx",
"email": "xxx"
}
],
"require": {
"php": ">=5.3.2",
"ext-iconv": "*",
"ext-intl": "*",
"igorw/composer-yaml": "dev-master",
"symfony/symfony": "2.1.*",
"doctrine/orm": ">=2.2.3,<2.4-dev",
"doctrine/doctrine-bundle": "1.0.*",
"twig/extensions": "1.0.*",
"symfony/assetic-bundle": "2.1.*",
"symfony/swiftmailer-bundle": "2.1.*",
"symfony/monolog-bundle": "2.1.*",
"sensio/distribution-bundle": "2.1.*",
"sensio/framework-extra-bundle": "2.1.*",
"sensio/generator-bundle": "2.1.*",
"jms/security-extra-bundle": "1.2.*",
"jms/di-extra-bundle": "1.1.*",
"propel/propel-bundle": "1.1.*"
},
"scripts": {
"post-install-cmd": [
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap"
],
"post-update-cmd": [
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap"
]
},
"config": {
"bin-dir": "bin"
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web"
}
}
I followed the installation of propel on http://www.propelorm.org/cookbook/symfony2/working-with-symfony2.html
then I used the comman
php app/console propel:form:generate #AcmeDemoBundle Book Author
and it throws following exception:
[ErrorException]
Catchable Fatal Error: Argument 1 passed to Propel\PropelBundle\Command\AbstractCommand::getSchemasFromBundle()
must implement interface Symfony\Component\HttpKernel\Bundle\BundleInterface, null given,
called in \vendor\propel\propel-bundle\Propel\PropelBundle\Command\FormGenerateCommand.php on line 55
and defined in \vendor\propel\propel-bundle\Propel\PropelBundle\Command\AbstractCommand.php line 268
I have tried this a few times (creating new projects and following the installation instruction of propel); I also tried it by installing all tags (one after another) of branch 1.1, but i always get the ErrorException from above.
I have searched if someone has the same problem, but I haven´t found anybody and I don´t know anymore what I could do.
which is your os?
if its windows and you use powershell then you might have the same problem as me. the # sign is an operator in powershell (see What does the "#" symbol do in Powershell?)
so in the windows powershell the bundle name has to be quoted
php app/console propel:form:generate '#AcmeStoreBundle'
maybe the problem also appears on other operation systems
official issue: https://github.com/propelorm/PropelBundle/issues/180