Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

When attempting to migrate, Truffle (nodeJS) waffles between two errors? #488

Closed
rts-2 opened this issue Jul 11, 2017 · 5 comments
Closed

Comments

@rts-2
Copy link

rts-2 commented Jul 11, 2017

  • [ ✔] I've asked for help in the Truffle Gitter before filing this issue.
    *In addition to asking for help on StackOverflow

Issue

I'm using truffle with a Node.js project, and when I attempt to migrate the project, I get the following error:
Windows Script Host

However, when I use the suggested fix, which is to rename the truffle.js file to something other than truffle.js (i.e. truffle-config.js), then I get a different error:

Could not find suitable configuration file.

When I rename the configuration file back to "truffle.js", then I get the first error all over again.
The solutions I've tried have included using Windows Powershell to run the program and running the command npm install --force -g truffle, neither of which have worked. I've looked into the recommended solution (#150), and none of the proposed solutions have worked so far.

Environment

  • Operating System: Windows 10
  • Truffle version: v3.3.0
  • node version: 6.11.0

Reproducing the Error

You must be using Windows 10, the project runs correctly with Linux. Run truffle migrate. You will get an error from Windows Script Host that will say 'module' is undefined. Change the name of the truffle Javascript file to truffle-config.js. Run truffle migrate again. You will get an error that says Could not find suitable configuration file. Change the name of the truffle-config.js file back to truffle.js. Run truffle migrate and you will get the 'module' is undefined error again.

@Frankie34
Copy link

start ganache
truffle compile + truffle migrate
that works for me

@CupoTa
Copy link

CupoTa commented Nov 28, 2018

truffle.cmd compile

@gnidan
Copy link
Contributor

gnidan commented Jan 9, 2019

Is this still an issue on Truffle v5? Thanks!

@stale
Copy link

stale bot commented May 9, 2019

Thank you for raising this issue! It has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you would like to keep this issue open, please respond with information about the current state of this problem.

@stale stale bot added the stale label May 9, 2019
@stale
Copy link

stale bot commented May 23, 2019

There has been no new activity on this issue since it was marked as stale 7 days ago, so it is being automatically closed. If you'd like help with this or a different problem, please open a new issue. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants