TypeError: input.charCodeAt is not a function
See original GitHub issueI get the following error:
Generating coverage environment
Running: truffle compile --network coverage
(this can take a few seconds)...
Compiling ./contracts/InterfacePatientRecords.sol...
Compiling ./contracts/Migrations.sol...
Compiling ./contracts/PatientRecords.sol...
Compiling ./contracts/SpringToken.sol...
Compiling ./contracts/TokenDestructible.sol...
Compiling zeppelin-solidity/contracts/math/SafeMath.sol...
Compiling zeppelin-solidity/contracts/ownership/Ownable.sol...
Compiling zeppelin-solidity/contracts/token/ERC20/BasicToken.sol...
Compiling zeppelin-solidity/contracts/token/ERC20/ERC20.sol...
Compiling zeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol...
Compiling zeppelin-solidity/contracts/token/ERC20/StandardToken.sol...
Compilation warnings encountered:
zeppelin-solidity/contracts/token/ERC20/BasicToken.sol:38:5: Warning: Invoking events without "emit" prefix is deprecated.
Transfer(msg.sender, _to, _value);
^-------------------------------^
,zeppelin-solidity/contracts/token/ERC20/StandardToken.sol:33:5: Warning: Invoking events without "emit" prefix is deprecated.
Transfer(_from, _to, _value);
^--------------------------^
,zeppelin-solidity/contracts/token/ERC20/StandardToken.sol:49:5: Warning: Invoking events without "emit" prefix is deprecated.
Approval(msg.sender, _spender, _value);
^------------------------------------^
,zeppelin-solidity/contracts/token/ERC20/StandardToken.sol:75:5: Warning: Invoking events without "emit" prefix is deprecated.
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
^-----------------------------------------------------------^
,zeppelin-solidity/contracts/token/ERC20/StandardToken.sol:96:5: Warning: Invoking events without "emit" prefix is deprecated.
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
^-----------------------------------------------------------^
,zeppelin-solidity/contracts/ownership/Ownable.sol:38:5: Warning: Invoking events without "emit" prefix is deprecated.
OwnershipTransferred(owner, newOwner);
^-----------------------------------^
,/home/nico/Desktop/public_repos/hospital_network/coverageEnv/contracts/SpringToken.sol:26:5: Warning: Invoking events without "emit" prefix is deprecated.
Transfer(0x0, msg.sender, INITIAL_SUPPLY);
^---------------------------------------^
Writing artifacts to ./build/contracts
Instrumenting ./coverageEnv/contracts/InterfacePatientRecords.sol
Skipping instrumentation of ./coverageEnv/contracts/Migrations.sol
Instrumenting ./coverageEnv/contracts/PatientRecords.sol
Cleaning up...
There was a problem instrumenting ./coverageEnv/contracts/PatientRecords.sol: TypeError: input.charCodeAt is not a function
Exiting without generating coverage...
truffle.js:
require('dotenv').config()
require('babel-register')({
ignore: /node_modules\/(?!zeppelin-solidity\/test\/helpers)/
})
require('babel-polyfill')
const Web3 = require("web3")
const web3 = new Web3()
const WalletProvider = require("truffle-wallet-provider")
const Wallet = require('ethereumjs-wallet')
const rinkebyPrivateKey = new Buffer(process.env["RINKEBY_PRIVATE_KEY"], "hex")
const rinkebyWallet = Wallet.fromPrivateKey(rinkebyPrivateKey)
const rinkebyProvider = new WalletProvider(rinkebyWallet, "https://rinkeby.infura.io/")
module.exports = {
migrations_directory: "./migrations",
networks: {
development: {
host: "localhost",
port: 9545,
network_id: "*" // Match any network id
},
coverage: {
host: "localhost",
network_id: "*",
port: 8555, // <-- If you change this, also set the port option in .solcover.js.
gas: 0xfffffffffff, // <-- Use this high gas value
gasPrice: 0x01 // <-- Use this low gas price
},
ganache: {
host: "127.0.0.1",
port: 7545,
network_id: 5777
},
rinkeby: {
provider: rinkebyProvider,
// You can get the current gasLimit by running
// truffle deploy --network rinkeby
// truffle(rinkeby)> web3.eth.getBlock("pending", (error, result) =>
// console.log(result.gasLimit))
gas: 6721975,
gasPrice: web3.toWei("50", "gwei"),
network_id: "4",
}
},
solc: {
optimizer: {
enabled: true,
runs: 500
}
}
}
.solcover.js
module.exports = {
copyNodeModules: true
}
Any ideas?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
TypeError: str.charCodeAt is not a function - Stack Overflow
I updated to node version 6 today and that might've broke something. I tried to get back to node 5.10 but the issue...
Read more >TypeError: this.input.charCodeAt is not a function · Issue #3089
Exception has occurred: TypeError TypeError: this.input.charCodeAt is not a function at Parser.
Read more >charcodeat is not a function javascript, typeerror
charcodeat is not a function javascript. The charCodeAt() method returns the Unicode of the character at the specified index in a string.
Read more >t.charcodeat is not a function - You.com | The AI Search ...
TypeError: str.charCodeAt is not a function - Stack Overflow ... This could be an issue with some module not being entirely compatible with...
Read more >String.prototype.charCodeAt() - JavaScript - MDN Web Docs
If index is not a number, it defaults to 0 . Return value. A number representing the UTF-16 code unit value of the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@NFhbar This should be fixed in
0.5.0
. Thanks!I can confirm that changing
to
Solves the problem. Thank you!