-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Can't compile contracts due to 'module' is undefined #150
Comments
Just wanted to check if anyone can help on the above error. I hadn't been able to get to it for the last few days, but will be getting back to it later today... I need some help with the above error. |
I am having the same issue. Same newbie status. Please help us! |
Quick tweak : -Find the file truffle.cmd |
@vmadrien is right - what is happening is the OS is trying to run the truffle.js file when you type |
Interesting. As an alternative, you can always try Git for Windows, which provides the Git BASH terminal. It's guaranteed to work correctly there. https://git-for-windows.github.io/ |
I should have explained that tweak more :) Thanks @brendan87 |
This issue has been fixed on the Truffle master branch and will be released later this week (likely tomorrow). The README has been updated in two places that describe how you can avoid this issue in the future. Thanks for reporting! http://truffle.readthedocs.io/en/latest/getting_started/installation/#recommendations-for-windows |
When I rename the file, then I get the error "Could not find suitable configuration file" - is anyone else having this problem? |
I am having this issue, just following the setup of the pet-shop (http://truffleframework.com/boxes/pet-shop), throwing this error when trying to @tcoulter If it was fixed, I seem to encounter a regression. I can go and manually rename the truffle.js as suggested, but it would be nice if that weren't necessary. |
Ah, never mind. Found this in the current documentation: |
WIN10 use PowerShell is OK |
If you have the same issue on Windows, instead of |
not sure if this get resolved but you can always use truffle.cmd compile |
Either use truffle.cmd compile or go to the /contract directory and use truffle compile . |
Yep, using |
Using truffle.cmd worked for me :) |
I had same problem on windows. But running it from inside the contracts folder worked without any issue. |
in windows try ... Because of PATH_EXT= .......... .JS Or remove '.JS' in PATH_EXT . |
Thank you It helped me! for compiling but still get error while migrating. |
I'm getting an error for 'module' is undefined when I run 'truffle compile' from the project folder.
![moduleundefined](https://cloud.githubusercontent.com/assets/2532215/14936245/4732f144-0eaf-11e6-807d-802c579b738e.png)
Any pointers to what might be going wrong? truffle init works fine and creates the project structure as described in the docs.
I'm a newbie to Truffle, so please let me know if I need to provide more info. Attaching the error screenshot
The text was updated successfully, but these errors were encountered: