#GitHub - brunocalado/compass-for-sequenc...
1 messages · Page 1 of 1 (latest)
Comment out or remove line 4 https://github.com/brunocalado/compass-for-sequencer/blob/main/scripts/init.js#L4
on line 2, you are doing
import {Compass} from './compass.mjs'
but the file name is compass.js mot .mjs
fixed and tested
I don't undertand why this is happening. I just copied this code from a working module.
I hate these ghost bugs. 😦
Stuff happens
Can you add this code at line 11 on the init.js script
console.debug('Compass', {
module: game.modules.get('compass-for-sequencer'),
comapss: Compass
});
and let me know what that outputs in the console when you refresh?
It don't display on the console. I think it's related.
manifest.json
"esmodules": [
"/scripts/init.js"
],
init.js
const moduleName = 'compass-for-sequencer';
import {Compass} from './compass.js'
Hooks.once('init', () => {
//Hooks.once('setup', () => {
// --------------------------------------------------
// Load API
// Request with: const compass = game.modules.get('compass-for-sequencer')?.api.compass;
//game.modules.get('compass-for-sequencer').api = { compass };
game.modules.get('compass-for-sequencer').api = { compass: Compass };
console.log('==========================')
console.debug('Compass', {
module: game.modules.get('compass-for-sequencer'),
compass: Compass
});
console.log('==========================')
// --------------------------------------------------
// Module Options
});
init.js is not being executed.
comment out your import and replace compass in the init.js files with {}
I suspect your code is breaking and never being run
Yes
What is the right way to do: import {Compass} from './compass.js' ?
change .debug to .log, I suspect you have debug statements hidden in your console.
That is the correct way to import which means something is breaking in that class and stopping the code from running
Alright, give me a minute I gotta look through your compass.js code
You double declare sequence on line 70: https://github.com/brunocalado/compass-for-sequencer/blob/main/scripts/compass.js#L70
You can just remove the let and do sequence = new Sequence()...
Thank you very much
Does that work?