I'm learning to use Truffle for the first time, and when I run migrate in the Truffle Develop console, I get the following error:

enter image description here


const FilePermissions = artifacts.require("FilePermissions");

module.exports = function (deployer) {

This error is vague to me, so please let me know if more code or config info is needed.

  • Never saw this error before. Can you share the code of the contract? I am curious about what generates such an error. Mar 25, 2022 at 18:37

1 Answer 1


I resolved this by resetting 1_initial_migration.js to its default:

var Migrations = artifacts.require("Migrations");

module.exports = function (deployer) {
  // Deploy the Migrations contract as our only task

and creating a new file 2_initial_migration.js with the contents from my original post.

This is because, according to these docs about Migrations.sol, you "must deploy this contract inside your first migration in order to take advantage of the migrations feature".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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