truffle compile error on windows.

Created on 29 Jun 2017  路  2Comments  路  Source: trufflesuite/truffle

I run truffle init webpack, and it installs and runs fine.
But immediately when I then do truffle compile, I get this error.

Line 2
Char 1
Object Expected
800A138F
Microsoft Jscript runtime error

Infact if I try truffle (anything), I get the error.

If I check the truffle.js file, its referring to this line.

require('babel-register')

I've run npm-install to make sure I had this file
Still get the error.

Any ideas?

  • Operating System: windows
  • Truffle version: 3.3.0
  • Ethereum client: testrpc
  • node version: 6.1.1

Most helpful comment

Solved: Just incase anyone has this same issue. It was the fact that its trying to run truffle.js in that directory, instead of actually running truffle.cmd.

So you need to find your truffle.cmd file, and rename it to something else. Like truf.cmd
I found mine in
\Users\AppData\Roaming\npm\truffle.cmd

Now you can do
truf init
truf compile
truf migrate

etc

All 2 comments

Solved: Just incase anyone has this same issue. It was the fact that its trying to run truffle.js in that directory, instead of actually running truffle.cmd.

So you need to find your truffle.cmd file, and rename it to something else. Like truf.cmd
I found mine in
\Users\AppData\Roaming\npm\truffle.cmd

Now you can do
truf init
truf compile
truf migrate

etc

@holoverse You can also run like this:

truffle.cmd compile

Was this page helpful?
0 / 5 - 0 ratings