Reference Error - not defined (develop console)
See original GitHub issue- I’ve asked for help in the Truffle Gitter before filing this issue.
truffle(development)> Election.deployed().then(function(instance) { app = instance })
ReferenceError: Election is not defined
truffle(development)> app.address
ReferenceError: app is not defined
Not sure why I’m receiving reference errors. No one replied on Gitter, and a Google search offered no solutions.
Environment
- Operating System: Windows 10
- Truffle version (
truffle version
): 4.1.8
Issue Analytics
- State:
- Created 5 years ago
- Comments:16 (4 by maintainers)
Top Results From Across the Web
ReferenceError: "x" is not defined - JavaScript - MDN Web Docs
ReferenceError : "x" is not defined. The JavaScript exception "variable is not defined" occurs when there is a non-existent variable referenced somewhere.
Read more >What does the error (ReferenceError: Console is not defined ...
In general, a reference error means that you used a word that JavaScript didn't recognize. It's neither a pre-existing part of the JavaScript...
Read more >Console error "Uncaught ReferenceError: $ is not defined"
This error means your jQuery file has not been loaded. Based on your code, you have to remove one of the script tags...
Read more >ReferenceError: "x" is not defined - Javascript
There is a non-existent variable referenced somewhere. This variable needs to be declared, or you need make sure it is available in your...
Read more >Getting the "img not defined" reference error in the console
Getting the "img not defined" reference error in the console · it loads a random image · it loads a list of breeds...
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 Free
Top 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
@ArranMcC To use
deployed
you’ll need to runmigrate
first. This deploys your contracts to the test chain managed by thedevelop
shell. The metacoin box is a working example you might find helpful, and check out the migrations documentation for help on writing deployment scripts:Thanks! I think it was just due to truffle not being unboxed into an empty directory, something which the tutorials I was following didn’t mention as they maybe thought it was obvious.