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


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


2 Answers 2


Otherwise you can simply rename the file


(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.

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. Commented Jun 20, 2018 at 15:53

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