Monthly archives: March, 2019

How to fix Support for the experimental syntax ‘classProperties’ isn’t enabled

Error: esources/reactSkilledMigrantPoint/containers/TaskAddContainer.js failed (from ./node_modules/babel-loader/lib/index.js): F:\document_root_002\xinxilan.org\laravel\resources\reactSkilledMigrantPoint\containers\TaskAddContainer.js: Support for the experimental syntax ‘classProperties’ isn’t enabled (20:18): andleChange = event => { ^ this.setState({ [event.currentTarget.name]: event.currentTarget.value }); lugin-proposal-class-properties (https://git.io/vb4SL) to the ‘plugins’ section of your Babel config to enable transformation. t.raise (F:\document_root_002\xinxilan.org\laravel\node_modules\@babel\parser\lib\index.js:3851:17)   How to fix: add .babelrc to the root path: { “presets”: [ “@babel/preset-env”, “@babel/preset-react” …

How to fix Laravel/nova issue of mod_fcgid: ap_pass_brigade failed in handle_request_ipc function

from apache error log: [fcgid:warn] [pid 5577:tid 139792914306816] (32)Broken pipe: [client 131.203.140.1:53559] mod_fcgid: ap_pass_brigade failed in handle_request_ipc function,   From laravel storage error log: [2019-03-25 12:02:10] prod.ERROR: file_put_contents(): Exclusive locks are not supported for this stream {“exception”:”[object] (ErrorException(code: 0): file_put_contents(): Exclusive locks are not supported for this stream at /virtual/teamlocal-laravel-nova.devweb.co.nz/laravel/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122) #0 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(2, ‘file_put_conten…’, …

How to fix “./composer.json” does not contain valid JSON

It something wrong in the composer.json file, check the config.platform  part: $ composer install [Composer\Json\JsonValidationException] “./composer.json” does not match the expected JSON schema: – config.platform : Array value found, but an object is required $ composer install[Seld\JsonLint\ParsingException] “./composer.lock” does not contain valid JSON Parse error on line 548: …-21T16:29:17+00:00″<<<<<<< HEAD======= ———————^ Expected one of: ‘EOF’, ‘}’, ‘:’, …

How to git merge one file from other branch to master

Step 1: clone from master git clone [email protected] Step 2: checkout the file from a branch $ git checkout dev Application/view/core/auth/email-reset.phtml error: pathspec ‘dev’ did not match any file(s) known to git. error: pathspec ‘Application/view/core/auth/email-reset.phtml’ did not match any file(s) known to git. $ ls Application/view/core/auth/email-reset.phtml ls: Application/view/core/auth/email-reset.phtml: No such file or directory $ git …

How to ignore everything in a directory except one sub folder or file

Here I want to ignore everything except the passport folder. You must exclude the vendor/ folder first(!/vender), then ignore everything ( /vendor/*) except the laravel folder itself(!/vendor/laravel), thenignore everything (/vendor/laravel/*) except the passport folder itself(!/vendor/laravel/passport/),: !/vender /vendor/* !/vendor/laravel /vendor/laravel/* !/vendor/laravel/passport/

Install php5.6/7.2/php5.3 different php version via macports

# Install php 5.3 sudo port install php53 php53-curl php53-fpm php53-gd php53-iconv php53-imagick php53-mbstring php53-mcrypt php53-mysql php53-openssl php53-iconv php53-mbstring sudo cp /opt/local/etc/php53/php.ini-development /opt/local/etc/php53/php.ini sudo cp /opt/local/etc/php53/php-fpm.conf.default /opt/local/etc/php53/php-fpm.conf cd /opt/local/etc/php53/ sudo vi php-fpm.conf change listen = 127.0.0.1:9053 start: sudo port load php53-fpm stop : sudo port unload php53-fpm => note, maybe need to change short_open_tag = …

Compress huge image files without suffix via Gulp

var gulp = require(‘gulp’); const imagemin = require(‘gulp-imagemin’); var once = require(‘async-once’); var imageminMozjpeg = require(‘imagemin-mozjpeg’); var rename = require(“gulp-rename”); const del = require(‘del’); var tap = require(“gulp-tap”); var replaceName = require(‘gulp-replace-name’); const source_dir = ‘img_source’; const target_dir = ‘img_gulp’; gulp.task(‘clean’, done => { del(target_dir + ‘/*.jpg’); // returns a promise done(); }); gulp.task(‘prepare’, done …