Meteor router-with-flash package can't be installed - meteor

I want to use router-with-flash in my Meteor project, but when I run
mrt add router-with-flash
It causes this error:
$ mrt add router-with-flash
✓ router-with-flash
tag: https://github.com/egtann/meteor-router.git#v0.4.1
/usr/local/lib/node_modules/meteorite/lib/sources/git.js:151
hrow "There was a problem checking out " + self.checkoutType + ": " + (self.co
^
There was a problem checking out tag: v0.4.1
In the repository, there is not tag v0.4.1
$ git ls-remote --tags git://github.com/egtann/meteor-router.git
c73515515f1d267108f78b4928a6866952290761 refs/tags/v0.1.0
bb806c51efe3686a8da6628269aa67a269a4e076 refs/tags/v0.1.1
2c42dcb1510563071903c90e840dfc546c7a50eb refs/tags/v0.2.0
7486a639a6793b65e87c11c102e7ecd84813d9f3 refs/tags/v0.2.1
b1e205f3cbde62ae3c91f06429d681580d9aa322 refs/tags/v0.2.2
0a6431923ba2724727233cf9300cdfe81076b9cd refs/tags/v0.2.3
edd0ad39c66a94536859bd322ea13135afebef0b refs/tags/v0.2.4
e6718dbccfbbf3f964464053a310ccbcdb766ece refs/tags/v0.2.5
a1866908a9fb6d287bb877c6583cee93f89e378e refs/tags/v0.2.6
c328f72a872ee9b8a6707743576b68ff6aa52a13 refs/tags/v0.3.0
ec83354533169fa7b2214f4e1b2faa87164c090f refs/tags/v0.3.1
bfa1cb328b94278f19fd6cec270f649cbedd5555 refs/tags/v0.3.2
1bb2182407892e9b95f0cf4f15a9a55e0a301c20 refs/tags/v0.3.3
What can I do with that?
I used regular router but i need flash messages.

Check your smart.json-file, and see if the router-with-flash-package is set with the v0.4.1-tag.
Change it to v0.3.3 (or whatever tag you want) and try again.

As Kristoffer says, smart.json should look like this:
{
"packages": {
"router-with-flash": {
"git": "https://github.com/egtann/meteor-router.git",
"tag": "v0.3.3"
}
}
}
But, "git" repository must be also specified.
Edit: but Meteor (v0.6.4) app with package "router-with-flash" version 0.3.3 crashes. I used regular router and implemented flash message with session.

Related

React Native Firebase Android always crash 0.61

Issue
I tried to add the react-native-firebase library https://github.com/invertase/react-native-firebase and everything works perfectly on iOS. When it comes to integration on android, nothing works.
The project Builds correctly, but the app crashes (only in Android) right after the build with this output:
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1099 file(s) to forward-jetify. Using 16 workers...
info Starting JS server...
info Launching emulator...
info Successfully launched emulator.
info Installing the app...
> Configure project :#react-native-firebase_analytics
:#react-native-firebase_analytics:firebase.bom using default value: 21.1.0
:#react-native-firebase_analytics package.json found at /Users/enzomanuelmangano/Desktop/Lavoro/halfy_app/node_modules/#react-native-firebase/analytics/package.json
:#react-native-firebase_analytics:version set from package.json: 6.0.3 (6,0,3 - 6000003)
:#react-native-firebase_analytics:android.compileSdk using custom value: 28:#react-native-firebase_analytics:android.targetSdk using custom value: 28
:#react-native-firebase_analytics:android.minSdk using custom value: 16
:#react-native-firebase_analytics:reactNativeAndroidDir /Users/enzomanuelmangano/Desktop/Lavoro/halfy_app/node_modules/react-native/android
> Configure project :#react-native-firebase_app
:#react-native-firebase_app:firebase.bom using default value: 21.1.0
:#react-native-firebase_app package.json found at /Users/enzomanuelmangano/Desktop/Lavoro/halfy_app/node_modules/#react-native-firebase/app/package.json
:#react-native-firebase_app:version set from package.json: 6.0.3 (6,0,3 - 6000003)
:#react-native-firebase_app:android.compileSdk using custom value: 28
:#react-native-firebase_app:android.targetSdk using custom value: 28
:#react-native-firebase_app:android.minSdk using custom value: 16
:#react-native-firebase_app:reactNativeAndroidDir /Users/enzomanuelmangano/Desktop/Lavoro/halfy_app/node_modules/react-native/android
> Configure project :app
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
> Task :app:processDebugGoogleServices
Parsing json file: /Users/enzomanuelmangano/Desktop/Lavoro/halfy_app/android/app/google-services.j
son
> Task :app:installDebug
12:49:58 V/ddms: execute: running am get-config
12:49:58 V/ddms: execute 'am get-config' on 'emulator-5554' : EOF hit. Read: -1
12:49:58 V/ddms: execute: returning
Installing APK 'app-debug.apk' on '3.7_WVGA_Nexus_One_API_28(AVD) - 9' for app:debug
12:49:58 D/app-debug.apk: Uploading app-debug.apk onto device 'emulator-5554'
12:49:58 D/Device: Uploading file onto device 'emulator-5554'
12:49:58 D/ddms: Reading file permision of /Users/enzomanuelmangano/Desktop/Lavoro/halfy_app/android/app/build/outputs/apk/debug/app-debug.apk as: rw-r--r--
12:49:59 V/ddms: execute: running pm install -r -t "/data/local/tmp/app-debug.apk"
12:50:02 V/ddms: execute 'pm install -r -t "/data/local/tmp/app-debug.apk"' on 'emulator-5554' : E
OF hit. Read: -1
12:50:02 V/ddms: execute: returning
12:50:02 V/ddms: execute: running rm "/data/local/tmp/app-debug.apk"
12:50:02 V/ddms: execute 'rm "/data/local/tmp/app-debug.apk"' on 'emulator-5554' : EOF hit. Read:
-1
12:50:02 V/ddms: execute: returning
Installed on 1 device.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 7s
192 actionable tasks: 3 executed, 189 up-to-date
info Connecting to the development server...
info Starting the app on "emulator-5554"...
Starting: Intent { cmp=com.halfy_app/.MainActivity }
MBP-di-Enzo:halfy_app enzomanuelmangano$
MBP-di-Enzo:halfy_app enzomanuelmangano$ react-native run-android --log
error: unknown option `--log'
MBP-di-Enzo:halfy_app enzomanuelmangano$ react-native run-android -log
error: unknown option `-l'
MBP-di-Enzo:halfy_app enzomanuelmangano$ react-native run-android
error React Native CLI uses autolinking for native dependencies, but the following modules are linked manually:
- react-native-maps (to unlink run: "react-native unlink react-native-maps")
This is likely happening when upgrading React Native from below 0.60 to 0.60 or above. Going forward, you can unlink this dependency via "react-native unlink <dependency>" and it will be included in your app automatically. If a library isn't compatible with autolinking, disregard this message and notify the library maintainers.
Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1099 file(s) to forward-jetify. Using 16 workers...
info JS server already running.
info Installing the app...
> Configure project :#react-native-firebase_analytics
:#react-native-firebase_analytics:firebase.bom using default value: 21.1.0
:#react-native-firebase_analytics package.json found at /Users/enzomanuelmangano/Desktop/Lavoro/halfy_app/node_modules/#react-native-firebase/analytics/package.json
:#react-native-firebase_analytics:version set from package.json: 6.0.3 (6,0,3 - 6000003)
:#react-native-firebase_analytics:android.compileSdk using custom value: 28
:#react-native-firebase_analytics:android.targetSdk using custom value: 28
:#react-native-firebase_analytics:android.minSdk using custom value: 16
:#react-native-firebase_analytics:reactNativeAndroidDir /Users/enzomanuelmangano/Desktop/Lavoro/halfy_app/node_modules/react-native/android
> Configure project :#react-native-firebase_app
:#react-native-firebase_app:firebase.bom using default value: 21.1.0
:#react-native-firebase_app package.json found at /Users/enzomanuelmangano/Desktop/Lavoro/halfy_app/node_modules/#react-native-firebase/app/package.json
:#react-native-firebase_app:version set from package.json: 6.0.3 (6,0,3 - 6000003)
:#react-native-firebase_app:android.compileSdk using custom value: 28
:#react-native-firebase_app:android.targetSdk using custom value: 28
:#react-native-firebase_app:android.minSdk using custom value: 16
:#react-native-firebase_app:reactNativeAndroidDir /Users/enzomanuelmangano/Desktop/Lavoro/halfy_app/node_modules/react-native/android
> Configure project :app
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
> Task :app:processDebugGoogleServices
Parsing json file: /Users/enzomanuelmangano/Desktop/Lavoro/halfy_app/android/app/google-services.j
son
> Task :app:installDebug
12:51:39 V/ddms: execute: running am get-config
12:51:39 V/ddms: execute 'am get-config' on 'emulator-5554' : EOF hit. Read: -1
12:51:39 V/ddms: execute: returning
Installing APK 'app-debug.apk' on '3.7_WVGA_Nexus_One_API_28(AVD) - 9' for app:debug
12:51:39 D/app-debug.apk: Uploading app-debug.apk onto device 'emulator-5554'
12:51:39 D/Device: Uploading file onto device 'emulator-5554'
12:51:39 D/ddms: Reading file permision of /Users/enzomanuelmangano/Desktop/Lavoro/halfy_app/android/app/build/outputs/apk/debug/app-debug.apk as: rw-r--r--
12:51:39 V/ddms: execute: running pm install -r -t "/data/local/tmp/app-debug.apk"
12:51:40 V/ddms: execute 'pm install -r -t "/data/local/tmp/app-debug.apk"' on 'emulator-5554' : EOF hit. Read:
12:51:40 V/ddms: execute: returning
12:51:40 V/ddms: execute: running rm "/data/local/tmp/app-debug.apk"
12:51:40 V/ddms: execute 'rm "/data/local/tmp/app-debug.apk"' on 'emulator-5554' : EOF hit. Read: -1
12:51:40 V/ddms: execute: returning
Installed on 1 device.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 4s
192 actionable tasks: 3 executed, 189 up-to-date
info Connecting to the development server...
info Starting the app on "emulator-5554"...
Starting: Intent { cmp=com.halfy_app/.MainActivity }
Android
android/build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 22
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
playServicesVersion = "17.0.0"
androidMapsUtilsVersion = "0.5+"
}
repositories {
google()
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:3.4.2")
classpath 'com.google.gms:google-services:4.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
mavenLocal()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
maven { url 'https://jitpack.io' }
}
}
android/app/build.gradle
apply plugin: "com.android.application"
apply plugin: 'com.google.gms.google-services'
import com.android.build.OutputFile
project.ext.react = [
entryFile: "index.js",
enableHermes: false, // clean and rebuild if changing
]
apply from: "../../node_modules/react-native/react.gradle"
/**
* Set this to true to create two separate APKs instead of one:
* - An APK that only works on ARM devices
* - An APK that only works on x86 devices
* The advantage is the size of the APK is reduced by about 4MB.
* Upload all the APKs to the Play Store and people will download
* the correct one based on the CPU architecture of their device.
*/
def enableSeparateBuildPerCPUArchitecture = false
/**
* Run Proguard to shrink the Java bytecode in release builds.
*/
def enableProguardInReleaseBuilds = false
/**
* The preferred build flavor of JavaScriptCore.
*
* For example, to use the international variant, you can use:
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
*
* The international variant includes ICU i18n library and necessary data
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
* give correct results when using with locales other than en-US. Note that
* this variant is about 6MiB larger per architecture than default.
*/
def jscFlavor = 'org.webkit:android-jsc:+'
/**
* Whether to enable the Hermes VM.
*
* This should be set on project.ext.react and mirrored here. If it is not set
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
* and the benefits of using Hermes will therefore be sharply reduced.
*/
def enableHermes = project.ext.react.get("enableHermes", false);
android {
compileSdkVersion rootProject.ext.compileSdkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
applicationId "com.halfy_app"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
// Caution! In production, you need to generate your own keystore file.
// see https://facebook.github.io/react-native/docs/signed-apk-android.
signingConfig signingConfigs.debug
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// https://developer.android.com/studio/build/configure-apk-splits.html
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02'
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.facebook.react:react-native:+" // From node_modules
implementation 'com.google.firebase:firebase-analytics:17.2.1'
implementation(project(':react-native-maps')){
exclude group: 'com.google.android.gms', module: 'play-services-base'
exclude group: 'com.google.android.gms', module: 'play-services-maps'
}
implementation 'com.google.android.gms:play-services-base:10.0.1'
implementation 'com.google.android.gms:play-services-maps:10.0.1'
if (enableHermes) {
def hermesPath = "../../node_modules/hermes-engine/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
} else {
implementation jscFlavor
}
}
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
project.ext.vectoricons = [
iconFontNames: [ 'MaterialIcons.ttf', 'FontAwesome.ttf' ] // Name of the font files you want to copy
]
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
apply from: file("../../node_modules/#react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
React Native Version: 0.61
I solved that problem erasing that code in android/app/build.gradle
implementation(project(':react-native-maps')){
exclude group: 'com.google.android.gms', module: 'play-services-base'
exclude group: 'com.google.android.gms', module: 'play-services-maps'
}
implementation 'com.google.android.gms:play-services-base:10.0.1'
implementation 'com.google.android.gms:play-services-maps:10.0.1'

Deploy Symfony 4 application but composer has "cache:clear error"

I try to deploy my Symfony application and when I use composer to install dependencies, I get an error.
I saw that there were people who had the same problem but I didn' t find a solution. Like change in .env APP_ENV=dev to APP_ENV=prod.
Here the logs :
Executing script cache:clear [KO]
[KO]
Script cache:clear returned with error code 255
!! PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "DoctrineFixturesBundle" from namespace "Doctrine\Bundle\FixturesBundle".
!! Did you forget a "use" statement for another namespace? in /tmp/build.YZSXu7Ir2b/src/Kernel.php:23
I use DoctrineFixturesBundle only in dev environment :
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.1",
"fzaninotto/faker": "^1.8",
"symfony/profiler-pack": "^1.0"
}
Here my config/bundles.php :
...
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
...
And here Line 23 of Kernel.php :
...
public function registerBundles(): iterable
{
$contents = require $this->getProjectDir().'/config/bundles.php';
foreach ($contents as $class => $envs) {
if ($envs[$this->environment] ?? $envs['all'] ?? false) {
yield new $class(); // line 23
}
}
}
...
if I understand your problem, you just have Composer Install, but the best is to do that composer install --no-dev --optimize-autoloader it's explained Here. Otherwise, I do not know
Please check if directory "vendor/doctrine/doctrine-fixtures-bundle" exists and if there are files inside - specifically the "vendor/doctrine/doctrine-fixtures-bundle/DoctrineFixturesBundle.php"
If they are not there then it seems you didnt executed "composer update" to add the package. In such case please try:
COMPOSER_MEMORY_LIMIT=-1 composer update doctrine/doctrine-fixtures-bundle
You should see something like:
- Installing doctrine/data-fixtures (v1.3.1): Loading from cache
- Installing doctrine/doctrine-fixtures-bundle (3.2.2): Loading from cache

QBS: Explicitly setting qbs.profiles inside Products causing build to fail

My use-case is this:
I have a static library which I want to be available for some profiles (e.g. "gcc", "arm-gcc", "mips-gcc").
I also have an application which links to this library, but this applications should only build using a specific profile (e.g. "arm-gcc").
For this I am modifying the app-and-lib QBS example.
The lib.qbs file:
import qbs 1.0
Product {
qbs.profiles: ["gcc", "arm-gcc", "mips-gcc"] //I added only this line
type: "staticlibrary"
name: "mylib"
files: [
"lib.cpp",
"lib.h",
]
Depends { name: 'cpp' }
cpp.defines: ['CRUCIAL_DEFINE']
Export {
Depends { name: "cpp" }
cpp.includePaths: [product.sourceDirectory]
}
}
The app.qbs file:
import qbs 1.0
Product {
qbs.profiles: ["arm-gcc"] //I added only this line
type: "application"
consoleApplication: true
files : [ "main.cpp" ]
Depends { name: "cpp" }
Depends { name: "mylib" }
}
The app build fails. Qbs wrongly tries to link to the "gcc" version of the library instead of the "arm-gcc" version, as you can see in the log:
Build graph does not yet exist for configuration 'default'. Starting from scratch.
Resolving project for configuration default
Setting up build graph for configuration default
Building for configuration default
compiling lib.cpp [mylib {"profile":"gcc"}]
compiling lib.cpp [mylib {"profile":"arm-gcc"}]
compiling lib.cpp [mylib {"profile":"mips-gcc"}]
compiling main.cpp [app]
creating libmylib.a [mylib {"profile":"gcc"}]
creating libmylib.a [mylib {"profile":"mips-gcc"}]
creating libmylib.a [mylib {"profile":"arm-gcc"}]
linking app [app]
ERROR: /usr/bin/arm-linux-gnueabihf-g++ -o /home/user/programs/qbs/usr/local/share/qbs/examples/app-and-lib/default/app.7d104347/app /home/user/programs/qbs/usr/local/share/qbs/examples/app-and-lib/default/app.7d104347/3a52ce780950d4d9/main.cpp.o /home/user/programs/qbs/usr/local/share/qbs/examples/app-and-lib/default/mylib.eyJwcm9maWxlIjoiZ2NjIn0-.792f47ec/libmylib.a
ERROR: /home/user/programs/qbs/usr/local/share/qbs/examples/app-and-lib/default/mylib.eyJwcm9maWxlIjoiZ2NjIn0-.792f47ec/libmylib.a: error adding symbols: File format not recognized
collect2: error: ld returned 1 exit status
ERROR: Process failed with exit code 1.
The following products could not be built for configuration default:
app
The build fails only when selecting one profile in the app.qbs file, and this profile should not be the first profile in the qbs.profiles line in the lib.qbs file.
When selecting two or more profiles - the build succeeds.
My analysis:
I think this problem is related to multiplexing:
The lib.qbs contains more than one profile. This turns on multiplexing when building the library, which, in turn, adds additional 'multiplexConfigurationId' to the build-directory name (moduleloader.cpp).
The app.lib contains only one profile, so multiplexing is not turned on and the build-directory name does not get the extra string.
The problem can be solved by changing the code (moduleloader.cpp) so that multiplexing is turned even if there is only one profile i.e. with the following patch:
--- moduleloader.cpp 2018-10-24 16:17:43.633527397 +0300
+++ moduleloader.cpp.new 2018-10-24 16:18:27.541370544 +0300
## -872,7 +872,7 ##
= callWithTemporaryBaseModule<const MultiplexInfo>(dummyContext,
extractMultiplexInfoFromProduct);
- if (multiplexInfo.table.size() > 1)
+ if (multiplexInfo.table.size() > 0)
productItem->setProperty(StringConstants::multiplexedProperty(), VariantValue::trueValue());
VariantValuePtr productNameValue = VariantValue::create(productName);
## -891,7 +891,7 ##
const QString multiplexConfigurationId = multiplexInfo.toIdString(row);
const VariantValuePtr multiplexConfigurationIdValue
= VariantValue::create(multiplexConfigurationId);
- if (multiplexInfo.table.size() > 1 || aggregator) {
+ if (multiplexInfo.table.size() > 0 || aggregator) {
multiplexConfigurationIdValues.push_back(multiplexConfigurationIdValue);
item->setProperty(StringConstants::multiplexConfigurationIdProperty(),
multiplexConfigurationIdValue);
This worked for my use case. I don't know if it make sense in a broader view.
Finally, the questions:
Does it all make sense?
Is this a normal behavior?
Is this use-case simply not supported?
Is there a better solution?
Thanks in advance.
Yes, the default behavior with multiplexing is that the a non-multiplexed product depends on all variants of the dependency. In general, there is no way for a user to change that behavior, but there should be.
However, luckily for you, profiles are special:
Depends { name: "mylib"; profiles: "arm-gcc" }
This should fix your problem.

Jenkins - Symfony with environment variables

I've been struggling in building automated build using Jenkins with symfony 3.4.
How to properly set environment variables in Jenkins that symfony can find it.
here's my pipeline.
node {
def app
stage('composer install') {
sh 'export $(cat env/env_vars | xargs)'
sh 'composer install --optimize-autoloader'
}
stage('yarn install') {
sh 'yarn install'
}
stage ('build assets') {
sh 'yarn encore production'
}
stage('Clone repository') {
// clone
}
stage('Build image') {
// build here
}
stage('Push image') {
// push here
}
}
then after I run my build.
I always got this message
....
Creating the "app/config/parameters.yml" file
Some parameters are missing. Please provide them.
database_host ('%env(DATABASE_HOST)%'): Script Incenteev\ParameterHandler
\ScriptHandler::buildParameters handling the symfony-scripts event terminated with an exception
[Symfony\Component\Console\Exception\RuntimeException]
Aborted
....
I already used some jenkins plugin like EnvInjector and something similar. But still symfony can't find my environment variables.
You can probably solve this like this:
stage('composer install') {
sh 'export $(cat env/env_vars | xargs) && composer install --optimize-autoloader'
}
This will make the environment variables available in the same shell session.

Foundation5 causing error on grunt/bower build

When building my project using Grunt and bower, Foundation seems to be causing an error. You can see it downloading packages, etc, then it quits with:
Fatal error: Unable to find suitable version for jquery
Here's my bower.json:
{
"name": "MyProject",
"version": "1",
"dependencies": {
"cytoscape": "2.2.7",
"datatables": "1.9.4",
"font-awesome": "4.0.3",
"foundation": "5.2.2",
"jquery-legacy": "jquery#1.11.0",
"kineticjs": "5.1.0",
"nouislider": "6.2.0",
"rem-unit-polyfill": "1.2.4",
"respond": ">=1.4.2"
}
}
I've tried removing each dependency from the bower.json above, one by one, and re-run my grunt file (which includes a trigger for bower install) each time. I get that error until I remove the Foundation line - then everything works ok (well, until Grunt looks for foundation files).
I've looked in Foundation's bower.json and its dependencies, but nothing "seems" amiss.
I attempted to add a resolution to my bower.json:
...,
"resolutions": {
"jquery": "1.11.0"
}
}
But that didn't help. (though I may be using that incorrectly?)
If I try bower install direct from the command line I get this:
> Unable to find a suitable version for jquery, please choose one:
> 1) jquery#~1.8.0 which resolved to 1.8.3+1 and has datatables#1.9.4 as dependants
> 2) jquery#>= 2.1.0 which resolved to 2.1.1 and has foundation#5.2.2 as dependants
> 3) jquery#>=1.2 which resolved to 2.1.1 and has jquery.cookie#1.4.1 as dependants
> 4) jquery#>= 1.7.0 which resolved to 2.1.1 and has nouislider#6.2.0 as dependants
>
> Prefix the choice with ! to persist it to bower.json
>
> [?] Answer:
I can pick a version there, and it seems to work. But I need this to work within the build script.
Try changing jQuery to be:
"jquery": "~1.11.0"
EDIT
According to Foundation's bower.json, it states that it requires jQuery >= 2.1
{
"name": "foundation",
"version": "5.2.2",
"main": [
"css/foundation.css",
"js/foundation.js"
],
"dependencies": {
"jquery": ">= 2.1.0",
"modernizr": ">= 2.7.2",
"fastclick": ">=0.6.11",
"jquery.cookie": "~1.4.0",
"jquery-placeholder": "~2.0.7"
},
"devDependencies": {
"jquery.autocomplete": "devbridge/jQuery-Autocomplete#1.2.9",
"lodash": "~2.4.1"
},
"private": true
}
There is a conflict between the 2 version then. Did you change that?

Resources