question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

truffle console: SyntaxError: Unexpected identifier

See original GitHub issue

Truffle migrate is working good but while running truffle console

  • SyntaxError: Unexpected identifier at new Script (vm.js:51:7) at createScript (vm.js:136:10) at Object.runInContext (vm.js:181:10) at Console.interpret (C:\Users\labo\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:106593:17) at ReplManager.interpret (C:\Users\labo\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:107310:18) at bound (domain.js:375:14) at REPLServer.runBound [as eval] (domain.js:388:12) at REPLServer.onLine (repl.js:492:10) at REPLServer.emit (events.js:180:13) at REPLServer.emit (domain.js:421:20)

Environment

  • Operating System: Windows
  • Ethereum client:
  • Truffle version (truffle version):v4.1.6
  • node version (node --version):v9.9.0
  • npm version (npm --version): 5.8.0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:22 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
cgeweckecommented, Apr 23, 2018

@vidhyaramani Hi. Within truffle console you don’t need to prefix the commands with truffle. To migrate, just type migrate. There’s a list of available commands here.

Could you check to see if removing the word ‘truffle’ from your command solves this problem?

0reactions
joeyBergercommented, Dec 27, 2018

You cannot use the truffle keyword when you are in truffle develop

Read more comments on GitHub >

github_iconTop Results From Across the Web

truffle compile - SyntaxError: Unexpected identifier · Issue #3964
Hey @SwanDoggMillionaire, you are just missing a comma at the end of line 14 in your truffle-config.js . Add one and you should...
Read more >
How to fix "Uncaught SyntaxError: Unexpected identifier" in ...
How to fix "Uncaught SyntaxError: Unexpected identifier" in truffle console? Ask Question. Asked 10 months ago. Modified 10 months ago. Viewed 208 times....
Read more >
For those who are getting some sort of error while using “truffle ...
Truffle migrate is working good but while running truffle console SyntaxError: Unexpected identifier at new Script… github.com.
Read more >
Prob with migrate command on Truffle
I am trying to execute the “migrate” command on the truffle. ... SyntaxError: Unexpected identifier ... (vm.js:284:10) at Console.interpret ...
Read more >
Problem with truffle - Moralis YouTube Tutorials
pragma solidity ^0.8.0, // Fetch exact version from solc-bin (default: truffle's version) ^^^^^^^^ SyntaxError: Unexpected identifier.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found