How to activate my package via the console?


#1
module.exports = {
  "activate": function (state) {
    console.log("activate");
  },

  "deactivate": function ()
  {
    console.log("deactivate");
  },

  "toggle": function () {
    console.log("toggle");
  }
}

I try to execute the following command in the atom console

atom.packages.activatePackage("my-package")

It does not print any message to the console


#2

Do you have the activationCommands key defined in the package.json? If so, try:

  1. Delete the activationCommands from the package.json
  2. Restart Atom
  3. Try activating the package again

See this FAQ for a little more details around package activation:


#3

You solve my problem!!