pieces = artworks
believe it or not
意味「信じられないだろうけど」 believe it or not
TypeScriptとReact/Next.jsでつくる 実践Webアプリケーション開発でエラー出た
P113の話、
ch03/next-sample
のnpm run build
で、
> next-sample@0.1.0 build > next build info - SWC minify release candidate enabled. https://nextjs.link/swcmin Failed to compile. ./pages/api/hello.ts 8:1 Warning: Assign arrow function to a variable before exporting as module default import/no-anonymous-default-export ./pages/image-sample.tsx 12:7 Warning: Do not use `<img>` element. Use `<Image />` from `next/image` instead. See: https://nextjs.org/docs/messages/no-img-element @next/next/no-img-element 12:7 Warning: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images. jsx-a11y/alt-text 16:7 Warning: Image elements must have an alt prop, either with meaningful text, or an empty string for decorative images. jsx-a11y/alt-text ./pages/link.tsx 39:6 Warning: React Hook useEffect has a missing dependency: 'router.events'. Either include it or remove the dependency array. react-hooks/exhaustive-deps 47:35 Error: `"` can be escaped with `"`, `“`, `"`, `”`. react/no-unescaped-entities 47:40 Error: `"` can be escaped with `"`, `“`, `"`, `”`. react/no-unescaped-entities 54:35 Error: `"` can be escaped with `"`, `“`, `"`, `”`. react/no-unescaped-entities 54:41 Error: `"` can be escaped with `"`, `“`, `"`, `”`. react/no-unescaped-entities
この変なエラー。
react/no-unescaped-entities
ルールの仕業?
.eslintrc.json
ってファイルの
{ "extends": "next/core-web-vitals" }
って書いてるのを
"rules": { "react/no-unescaped-entities": 0 }
追加する。
つまり
{ "extends": "next/core-web-vitals", "rules": { "react/no-unescaped-entities": 0 } }
カンマ忘れず。
これでnpm run build
行けた。
Flutterのflutter.minSdkVersionとの戦い
これがうぜー。
/Users/shinriyo/development/flutter_apps/joyreco/android/app/build.gradle: │ │ android { │ │ defaultConfig { │ │ minSdkVersion 19 │ │ } │ │ } │ │
// You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. minSdkVersion flutter.minSdkVersion targetSdkVersion flutter.targetSdkVersion
flutter.minSdkVersion
を直接書き換えるのも変。
android/local.properties
flutter.minSdkVersion=26
って追加したらいけるっておもったら行けない。 ここに書いた場合は、
minSdkVersion localProperties.getProperty('flutter.minSdkVersion').toInteger()
みたいに書かないと
android/local.properties
ファイルが呼ばれないっぽい・・・。
ちなみに.toInteger()
はつけなくてもいいらしい。
元々flutter.minSdkVersion
って書いてたのを書き換えるのもなんか流儀に反してるような気が・・・。
この記事を参考にした。 FlutterでAndroidのbuildをしたらエラーが出た!
記事では、/Users/hashimotojunichi/Development/flutter/packages/flutter_tools/gradle
僕は fvm
使っているので、
/Users/shinriyo/fvm/versions/3.0.5
の中にある
3.0.5
が/flutter/
に相当するので、
/Users/shinriyo/fvm/versions/3.0.5/packages/flutter_tools/gradle/flutter.gradle
にあった。
//static int minSdkVersion = 16 static int minSdkVersion = 21
に書き換えたらOK!I