6
votes
Help Please Solidity version pragma statement in these files doesn't match the configured compilers in your config*contracts/hello-world.sol ("0.8.4")
try this:
at hartdhat.config.js
module.exports = {
solidity: "0.7.1",
};
0.7.1--> 0.8.4 (solidity version you use in the smart contract)
if not work, comment below, or git upload code ...
6
votes
TypeError: web3_1.default is not a constructor
If using a recent web3 (e.g. 1.0.0-beta.50), a possible remedy is to set esModuleInterop:
{
"compilerOptions": {
"esModuleInterop": true
}
}
See also: https://github.com/ethereum-ts/...
5
votes
Accepted
Not getting getPastEvents or once function using contract instance
This web3 version is a few years old you should probably use a new one.
Make sure to update!
4
votes
Accepted
Load Smartcontract in Nodejs
Get the contract object via:
const contract = await new web3.eth.Contract(JSON.parse(interface), smartContractAddress);
3
votes
Help Please Solidity version pragma statement in these files doesn't match the configured compilers in your config*contracts/hello-world.sol ("0.8.4")
it needs to match up with what's in module.exports in your hardhat.config.js
but the quotes in the contract are causing the problem
try this
pragma solidity ^0.8.4;
3
votes
Accepted
Ganache GUI installation error
There is an alternative method. You can download ganache from the below link
$https://github.com/trufflesuite/ganache/releases/download/v1.2.2/ganache-1.2.2-x86_64.AppImage
After it has downloaded ...
3
votes
Accepted
Linux: node-gyp installation woes in scrypt package
Looking at the comments, two ideas were mentioned: I was running Node v12, and @Jay suggested downgrading to v11, and @Ismael suggested that the fail could be triggered by importing a web3 <1.2.9. ...
3
votes
hardhat-shorthand is not working
Found the solution:
Instead of yarn, use npm or npx for installing.
Use npm install --global hardhat-shorthand
Instead of yarn global add hardhat-shorthand
Hardhat team mentions something similar in ...
3
votes
hardhat-shorthand is not working
yarn won't complain if it can't install some components as a result of a lack of administrator privileges. Try doing the installation as root and it should work.
sudo yarn global add hardhat-shorthand
2
votes
Accepted
Error while installing web3
Your version of Python does not match the required version for one of the dependencies. To explain your error in more detail, Python is not compiled, so version mismatch is found at run-time. The ...
2
votes
Accepted
Not able to interact with Ganache-cli: "-bash: ganache-cli: command not found"
You should (almost) never use sudo with npm. Once you do so the folders and files npm touches/creates are now locked to the root user only.
The simplest solution is to do sudo rm -rf node_modules for ...
2
votes
Can't install Truffle Framework to Mac OS Big Sur
I manage to make it by installing HomeBrew first you can get this at this link: https://brew.sh/
You will have to type this before you start using brew command export PATH="/opt/homebrew/bin:$...
2
votes
npm throw errors when installing dependencies of hardhat
Hardhat migrated waffle plugin to the chai detailed info here
https://hardhat.org/hardhat-runner/docs/guides/migrating-from-hardhat-waffle#migrating-away-from-hardhat-waffle
2
votes
Web3 js installation error
I am expecting that you already executed npm init at first.
I assume you are using windows? I always develop blockchain related stuff on Ubuntu.
Here is what you need to do on windows to set it up ...
1
vote
Accepted
Is it okay to make "OpenZeppelin contracts" a dev dependency in my React app?
Short answer
It's probably safe. It depends on how you structured your contract build step, but odds are you'll be fine.
Long answer
The question really boils down to "what's the difference ...
1
vote
npm throw errors when installing dependencies of hardhat
npm install --save-dev hardhat
npx hardhat
npm install --save-dev @nomicfoundation/hardhat-toolbox
npx hardhat test or compile
don’t use
npm install --save-dev @nomiclabs/hardhat-waffle ethereum-...
1
vote
Unable to install Truffle - Warn and Error
had this same problem, but when I tried to run the windows-build-tools, it just gost stucked.
Tried a few times and instead of trying to do the installation via Chocolatey, I just ignored it (since it ...
1
vote
Unable to install npm truffle - WARN deprecated
No need to worry. This is not a failure message but just some warnings. If you get errors, something went wrong. Truffle will work just fine. You can verify that the installation was successful with
...
1
vote
Accepted
SyntaxError: await is only valid in async function
You need change the fallback method inside beforeEach to be an async method as follows:
beforeEach(async() => {
// Get list of all accounts
accounts = await web3.eth.getAccounts();
// ...
1
vote
Connect Typescript dependency with Solidity contract
I use 0xWeb to generate typescript classes to access the blockchain directly
$ npm i 0xweb -g
$ 0xweb init
$ 0xweb install 0xab33e884ec8fed4f5867246e4300228f3d666561 --name dydx/oasis-matching-...
1
vote
1
vote
Cannot install truffle. Node.js and npm are installed
Tried upvoting @Praktisch's answer, but I don't have enough reputation yet.
npx worked for me. I had the same problem. Switched from zsh to bash. Added folders to execution path. No luck.
If I ...
1
vote
Cannot install truffle. Node.js and npm are installed
try npx truffle init after you install npm and truffle
1
vote
Truffle not working after install using npm
I had this issue as well, the problem is the nodejs version.
Updating to v15.11.0 and reinstalling Truffle should fix it.
1
vote
Can't install Truffle Framework to Mac OS Big Sur
Try "brew install truffle"
It worked for me.
1
vote
Can't install Truffle Framework to Mac OS Big Sur
You are running into permission issues. MacOS is a Linux based operating system. Linux based operating systems require administrative privileges to make editorial changes to root directories. On MacOS ...
1
vote
Accepted
Problem with installing web3 on ubuntu 18.04 using npm
Try to install web3, without "-g", just npm install web3 (like the package states)
-g is used to have the command available in all directories, but you will only need web3 in your client ...
1
vote
npm ERR! code ENOENT npm ERR! syscall spawn git
I already install git in my computer. However, I forget to set it to environment variables. After I set it, the error disappeared and unboxed react successfully.
The solution of this error is to set ...
1
vote
Ganache GUI installation error
I guess it is not compatible with node 12.x
I managed to install it with node 10.16.0
I also had to install the following to solve some error messages:
sudo apt-get install libgconf-2-4
sudo apt ...
1
vote
Issue with the "npm install drizzle" command on Windows
As mentioned here, "npm install drizzle is no longer supported, it's now npm install @drizzle/store." Also, Make sure you clear cache using npm cache clean --force.
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
npm × 66truffle × 19
nodejs × 19
solidity × 15
web3js × 13
hardhat × 10
javascript × 6
blockchain × 5
ganache × 4
react × 4
installation × 4
typescript × 4
contract-development × 3
solc × 3
openzeppelin × 3
hardhat-deploy × 3
dapps × 2
uniswap × 2
frontend × 2
solcjs × 2
go-ethereum × 1
remix × 1
contract-design × 1
metamask × 1
contract-invocation × 1