I got this error message during reconfiguration of cisco switch 3560G series.
Before configure a “trunk” mode we have to configure encapsulation.
to solve the problem
(config-if)#switchport trunk encapsulation dot1q
(config-if)#switchport mode trunk
now, everything is good, we can add vlans in this way
(config-if)#switchport trunk allowed vlan add 10