so I'm deploying a basic smart contract with web3js and I'm compiling it with solc. It compiles fine but for whatever reason, it doesn't deploy...

Here's my backend...

pragma solidity ^0.5.0;

contract Token {
    string public name = "My Name";

Here's my frontend...

const Token = artifacts.require("Token");

module.exports = function (deployer) {

And this is what my terminal returned...

const token = await Token.depolyed()
TypeError: Token.depolyed is not a function
    at evalmachine.<anonymous>:1:15

I'm pretty new to Dapp development so please be patient with me.

Thank you!

  • +1 for the effort to format the post. Using indentation for code blocks makes it easy to format. Jun 9, 2021 at 18:32
  • also, note that it should be deployed instead of depolyed --> here: const token = await Token.depolyed()
    – bguiz
    Jun 10, 2021 at 6:23

1 Answer 1


you can't run const token twice. clear the truffle console, start again and this time run token as the next line


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.