hardhatとetherscanを使ってcontractをverifyする際に下記のようなエラーが出る場合があります。この対処方法を紹介します。Nothing to compileError in plugin @nomiclabs/hardhat-etherscan: The constructor for contracts/ExampleContract.sol:ExampleContract has 2 parameters
but 0 arguments were provided instead.
npx hardhat compileやnpx hardhat run scripts/deploy.jsで下記のエラーが出た時の対応法を紹介します。HardhatError HH700 Artifact for contract ContractExample not found.すでに、contractがあるにもかかわらず、うまくcompileできない場合があります。その場合はキャッシュが残っているのが原因であるので、npx hardhat clean
webpack-dev-serverでサーバを立ち上げたときに、下記のようにエラーが出たので、 その対応方法を紹介します。configurationThe 'mode' option has not been set, webpack will fallback to 'production' for this value.Set 'mode' option to 'development' or 'production' to enable defaults for each environment.You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/
webpackでbabelを使う際に下記のようなエラーに遭遇しました。 主なエラーは、
Error: Plugin/Preset files are not allowed to export objects, only functions.
になります。これはbabelのバージョンの違い(babel 6とbabel 7)により生じるエラーです。
そのため、新しいbabelに揃えるために、babelの一式のmoduleを消して、その後あたらしいものを入れます。 例えば、こんな感じで消して
error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index typeのエラーが出た時の対処方法を紹介します。解決方法はobjectに型を定義してあげることです。[key: string]: stringとすることでkeyに入る部分はstring型であることを明示します。 そうすることで、indexとして使われる際にはstring型を許容するようになり、buildエラーも無くなります。
'example.ts' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement to make it a module.ts(1208)
Line 7:29: React Hook "useState" cannot be called inside a callback. React Hooks must be called in a React function component or a custom React Hook function react-hooks/rules-of-hooksのエラーが起きる原因と解消方法の解説
Line 39:1: foo import should occur before import of ../hoge import/orderのようなエラーが出た時の対処方法を紹介します。これはそのままの意味で、`foo`というコンポーネントのimportは`../hoge`のコンポーネントの前でimportしてねという意味です。importの順番を変えてあげれば解消できます!
solidityを使っていて下記のwarningを消す方法とそもそも何でているのかを説明します。
Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing SPDX-License-Identifier SPDX-License to each source file. Use SPDX-License-Identifier UNLICENSED for non-open-source code Please see
python3 -m pip install numpy.とpython3でnumpyをinstallしようとしたときに以下のエラーが出たので対処法を紹介します。ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: というエラーが出たときは権限の問題なので、権限あるユーザで実行したらおしまいです。
nodenvで新しいバージョンをインストールしたときに、
`yarn`のコマンドがないよと言われたときの対処法を紹介します。nodenv: yarn: command not found
The `yarn' command exists in these Node versions:
なっときはnpm経由でyarnを入れてあげるのが早いです。
nodenvで新しいnodeのバージョンをインストールしようとしたときに、 下記のように怒られてインストールできませんでした。`nodenv install 16.5.0 node-build: definition not found: 16.5.0
See all available versions with `nodenv install --list'.`その時の対処方法を紹介します。
Electronでtensorflowを使っていて、
Please run command 'npm rebuild @tensorflow/tfjs-node --build-addon-from-source' to rebuild the native addon module.がでたときの対象方法
An error occurred while installing mysql2 (0.5.3), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.5.3' --source 'https://rubygems.org/'` succeeds before bundling.こんなエラーが起きた時の対処法をお教えします。
Webpacker::Manifest::MissingEntryErrorというエラーが起き、詳しく見ると
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
というエラーが起きている時の対処方法を紹介します。
An error occurred while installing mimemagic (0.3.10), and Bundler cannot continue.
というエラーが起きてminemagicのインストールができない。そんなことに困っていませんか、
どうしたらそれを回避できるのか紹介します。
react carouselを使おうとしても、Next.jsではそのままでは使えません。
公式ドキュメントの方法だと、Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.というエラーが出てしまいます。その際の解決方法を紹介します。