I’ve been learning Solidity using this course by Stephen Grider and it’s been going well until now, where I am trying to deploy my code to the Rinkeby test network.
For reference, I am using Node version 11.15.0 with npm version 6.7.0 with these dependencies:
"dependencies": { "ganache-cli": "^6.4.3", "mocha": "^6.1.4", "nan": "^2.14.0", "scrypt": "^6.0.3", "solc": "^0.4.25", "truffle": "^4.1.15", "truffle-hdwallet-provider": "0.0.4", "web3": "^1.0.0-beta.35" }
I have spent hours switching between versions of Node.js, npm, and all sorts of combinations of the dependencies, from the most current versions to the versions specified in the course. While I am getting a multitude of issues, the most prominent two seem to be
(node:32436) V8: C:Desktopsolidityinboxnode_modulessolcsoljson.js:3 Invalid asm.js: Invalid member of stdlib
and
C:Desktopsolidityinboxnode_modulessolcsoljson.js:1 var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=typeof window==="object";var ENVIRONMENT_IS_WORKER=typeof importScripts==="function";var ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){if(!Module["print"])Module["print"]=function print(x){process["stdout"].write(x+"n")};if(!Module["printErr"])Module["printErr"]=function printErr(x){process["stderr"].write(x+"n")};var nodeFS=require("fs");var nodePath=require("path");Module["read"]=function read(filename,binary){filename=nodePath["normalize"](filename);var ret=nodeFS["readFileSync"](filename);if(!ret&&filename!=nodePath["resolve"](filename)){filename=path.joi Error: CONNECTION ERROR: Couldn't connect to node rinkeby.infura.io/v3/acb10732334e4450ba7dc55e618eb70a. at Object.InvalidConnection (C:Desktopsolidityinboxnode_modulestruffle-hdwallet-providernode_modulesweb3libweb3errors.js:28:16) at HttpProvider.sendAsync (C:Desktopsolidityinboxnode_modulestruffle-hdwallet-providernode_modulesweb3libweb3httpprovider.js:129:25) at Web3Subprovider.handleRequest (C:Desktopsolidityinboxnode_modulesweb3-provider-enginesubprovidersweb3.js:13:17) at next (C:Desktopsolidityinboxnode_modulesweb3-provider-engineindex.js:95:18) at FilterSubprovider.handleRequest (C:Desktopsolidityinboxnode_modulesweb3-provider-enginesubprovidersfilters.js:87:7) at next (C:Desktopsolidityinboxnode_modulesweb3-provider-engineindex.js:95:18) at HookedWalletSubprovider.handleRequest (C:Desktopsolidityinboxnode_modulesweb3-provider-enginesubprovidershooked-wallet.js:109:7) at next (C:Desktopsolidityinboxnode_modulesweb3-provider-engineindex.js:95:18) at Web3ProviderEngine._handleAsync (C:Desktopsolidityinboxnode_modulesweb3-provider-engineindex.js:82:3) at Web3ProviderEngine._fetchBlock (C:Desktopsolidityinboxnode_modulesweb3-provider-engineindex.js:191:8) at Web3ProviderEngine._fetchLatestBlock (C:Desktopsolidityinboxnode_modulesweb3-provider-engineindex.js:167:8) at Web3ProviderEngine._startPolling (C:Desktopsolidityinboxnode_modulesweb3-provider-engineindex.js:144:8) at Web3ProviderEngine.start (C:Desktopsolidityinboxnode_modulesweb3-provider-engineindex.js:38:8) at new HDWalletProvider (C:Desktopsolidityinboxnode_modulestruffle-hdwallet-providerindex.js:46:15) at Object.<anonymous> (C:Desktopsolidityinboxdeploy.js:6:18) at Module._compile (internal/modules/cjs/loader.js:816:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10) at Module.load (internal/modules/cjs/loader.js:685:32) at Function.Module._load (internal/modules/cjs/loader.js:620:12) at Function.Module.runMain (internal/modules/cjs/loader.js:877:12) at internal/main/run_main_module.js:21:11
My question would be are there any fixes for either of these issues based on my code, or is there a simpler way to deploy to the blockchain? Thank you in advance.
Advertisement
Answer
Error: CONNECTION ERROR: Couldn't connect to node rinkeby.infura.io/v3/acb10732334e4450ba7dc55e618eb70a.
You probably meant https://rinkeby.infura.io/...
(You’re missing the https://
.)