htmlwidgets can not find function without :::namespace

I am trying to make my first htmlWidget. I followed the below steps and created my widget:

library(htmlwidgets)
library(devtools)

setwd("C:/R/Package")

devtools::create("myPackage")

setwd("C:/R/Package/myPackage")

htmlwidgets::scaffoldWidget("myPackage")

When I install the package and try to execute the myPackage("Hello World") function I get the error "Can not find function "myPackage" " It will only execute when I use myPackage:::myPackage("Hello World"). Why do I need to add the :::namespace tag?

devtools::install()
library(myPackage)
myPackage("Hello World")

Functions in packages can be either exported or non exported.
Exported functions use :: non exported:::
Your function is non exported , if you made it an exported function it would then work like most functions you are probably most familiar with.

Thanks a lot. After trying multiple things my problem was solved by running devtools::document() after the creation of the package.