4

This question already has an answer here:

Running truffle from command line gives me this Windows 7 popup message:

error

While init runs successfully. I see file truffle.js in my project folder. How can I handle this gently?

marked as duplicate by Ismael, Dawny33, Badr Bellaj, Richard Horrocks, Matthew Schmidt Jul 12 '17 at 11:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

5

Otherwise you can simply rename the file

C:\User\name\AppData\Roaming\npm\truffle.bat

(for exmaple in truf.bat); in this way, as you said, avoid confusion with microsoft command lines.

Update (12.07.2018)

It is a known problem and now also part of the official truffle-documentation. They provide 4 different solutions:

  • Call the executable file explicitly using its .cmd extension (truffle.cmd compile)
  • Edit the system PATHEXT environment variable and remove .JS; from the list of executable extensions
  • Rename truffle.js to something else (truffle-config.js)
  • Use Windows PowerShell or Git BASH, as these shells do not have this conflict.
3

This is how I've solved it:

C:\Users\steve\AppData\Roaming\npm\truffle migrate

looks like architecture flaw if truffle: config file is truffle.js, which confuses windows command line...

  • This ! It's truffle.js that is causing the issue. Simply delete it and use truffle-config.js only. – Nico Vergauwen Jun 20 '18 at 15:53

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