Welcome to the forum.Just a guess, but are you loading the the file from a file or via a web server? It won't work if you are loading it from a file, i.e. file:///C:/sample/index.html. If so, you need to use a local web server, use an IDE with one built in, use a real web server, etc. Then load the file via http://localhost/sample/index.html for example.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.