Noob Question - Hello World

I tried loading a pre-written Hello World module and I do not see anything in the console. module.json
{
"id": "Mytest",
"title": "My Test - My First Freewheeling Module",
"description": "just a demo to test the development process.",
"authors": [
{
"name": "Charwoman Gene"
}
],
"version": "0.0.0",
"compatibility": {
"minimum": "12",
"verified": "12"
},
"scripts": [
"scripts/hello.js"
]
}
{
"id": "Mytest",
"title": "My Test - My First Freewheeling Module",
"description": "just a demo to test the development process.",
"authors": [
{
"name": "Charwoman Gene"
}
],
"version": "0.0.0",
"compatibility": {
"minimum": "12",
"verified": "12"
},
"scripts": [
"scripts/hello.js"
]
}
hello.js
console.log("Hello World! This code runs immediately when the file is loaded.");

Hooks.on("init", function() {
console.log("This code runs once the Foundry VTT software begins its initialization workflow.");
});

Hooks.on("ready", function() {
console.log("This code runs once core initialization is ready and game data is available.");
});
console.log("Hello World! This code runs immediately when the file is loaded.");

Hooks.on("init", function() {
console.log("This code runs once the Foundry VTT software begins its initialization workflow.");
});

Hooks.on("ready", function() {
console.log("This code runs once core initialization is ready and game data is available.");
});
3 Replies
CussaMitre
CussaMitre2d ago
Did you activate the module on the world?
RobinG
RobinGOP2d ago
Yes, and it indicated that the application was restarting
CussaMitre
CussaMitre2d ago
The id should be lowercase and the folder has to be the same name of the id. Are they equal? Check if Foundry is complaining about something before entering in the world

Did you find this page helpful?