現役プログラマのWordPressカスタマイズ相談

WordPress(ワードプレス)のお悩み、うまくいかなくてお困りなこと、不具合調査、新規制作依頼まで、ウェブアプリケーションエンジニアがあなたをサポートします。

ふるさと納税-商品券ジャンルなら小山町

ふるさと納税商品券金券

今年2度目のふるさと納税です。

恥ずかしながら給料が高い会社で働いている訳ではないため、たくさん寄付できる状況ではありません。かといって少額をいろいろ試すのも管理が面倒、また還元率も悪くなってしまいます。ということで高額なもの1つで2018年は終わらせようと考えました。

ちょうどよかったのが

静岡県小山町 QUOカード 1万円分 」寄付金額25,000円

高額返礼品問題で今は終了しています。

が、類似の返礼品も出ているのでそちらも紹介しておきます。

続きを読む

WARNING in ./node_modules/Firebase/dist/index.cjs.js

angular で Firebase を使ったときに起こったWARNING

解決しないと実行できません。。

[ng] WARNING in ./node_modules/Firebase/dist/index.cjs.js
[ng] There are multiple modules with names that only differ in casing.
[ng] This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
[ng] Use equal casing. Compare these module identifiers:
[ng] * /<path>/node_modules/Firebase/dist/index.cjs.js
[ng]     Used by 5 module(s), i. e.
[ng]     /<path>/node_modules/@ngtools/webpack/src/index.js!/<path>/src/app/detail/detail.page.ts
[ng] * /<path>/node_modules/firebase/dist/index.cjs.js
[ng]     Used by 5 module(s), i. e.
[ng]     /<path>/node_modules/@ngtools/webpack/src/index.js!/<path>/src/app/app.component.ts
[ng] ℹ 「wdm」: Compiled with warnings.

ワーニングの内容は

複数のモジュールで名前がケースによって異なる
大文字、小文字のファイルをコンパイルすると、予期しない動作につながる可能性がある

といった感じ。

 

detail.page.ts のfirebaseのimport記述を確認したところ

import * as firebase from 'Firebase';

となっていた。

警告通り、大文字Fを小文字fに変更してみた

import * as firebase from 'Firebase';

そして実行。

[ng] WARNING in ./node_modules/Firebase/dist/index.cjs.js
[ng] There are multiple modules with names that only differ in casing.
[ng] This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
[ng] Use equal casing. Compare these module identifiers:
[ng] * /<path>/node_modules/Firebase/dist/index.cjs.js
[ng]     Used by 3 module(s), i. e.
[ng]     /<path>/node_modules/@ngtools/webpack/src/index.js!/<path>/src/app/create/create.page.ts
[ng] * /<path>/node_modules/firebase/dist/index.cjs.js
[ng]     Used by 7 module(s), i. e.
[ng]     /<path>/node_modules/@ngtools/webpack/src/index.js!/<path>/src/app/app.component.ts
[ng] ℹ 「wdm」: Compiled with warnings.

modulesの数字が変化した。

解決したのか?

同様に create.page.ts のimportも修正し実行。

[ng] Date: 2018-09-28T02:05:58.160Z - Hash: ff79b76efc66c6cf0588 - Time: 8958ms
[ng] 176 unchanged chunks
[ng] chunk {create-create-module} create-create-module.js, create-create-module.js.map (create-create-module) 9.08 kB  [rendered]
[ng] ℹ 「wdm」: Compiled successfully.

無事解決 ヽ(^o^)丿

githubに載っていたものを参考にしたんだけど。。。

Firebaseの「F」の大文字が原因だったのか?

phpでzip生成しダウンロードしたファイルをmacで展開するとcpgzになる

f:id:jsaz:20180808232108p:plain

ZipArchiveを使ってもexec関数でzipコマンドを使っても発生する現象

ロジックはネットに記載されているものでOK。

最後にファイルを読み込んでいるところ

echo file_get_contents([Zipファイル]);

または

readfile([Zipファイル]);

の処理の直前に

続きを読む

ふるさと納税-フルーツソムリエが選ぶゴールドキウイ

f:id:jsaz:20180729171029j:plain:w320

ふるさと納税ゴールドキウイをリピートです。

ちょうど一年前に さとふるにて申し込んだ(寄付)お礼品を今年も再申し込みしてみました。

感想と昨年との違いを残します。

続きを読む