Currently, I'm working within a package called Test. This package has two Commands (Scripts) inside of it: "Test1" and "Test2".
Test1 has the following code: module.exports.exportingTest = 7;
Test2 has the following code: var testModule = require('package:cltysuhgt0003r110rrlojkeb');
I got the 'package:cltysuhgt0003r110rrlojkeb'
string by selecting the Test1 script and clicking Command > Copy Command ID Local to Package. I also tried using the string from Command > Copy Command ID. Either way, I get an error on the 'package:cltysuhgt0003r110rrlojkeb'
string that says:
Cannot find module 'package:cltysuhgt0003r110rrlojkeb'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
Here's a screenshot of how my packages and scripts are laid out in the file browser:

It's as if my Test2 script just can't see my Test1 script. Any suggestions would be much appreciated!
- Kitch Membery @Kitch2024-03-19 20:49:21.919Z
Hi @McJulian,
I believe the issue here is that you are not de-structuring the
require
call.Try changing the
require
line in your Test2 script to the following.const { exportingTest } = require('package:cltysuhgt0003r110rrlojkeb');
I've not tested this, so let me know if you need further guidance.
Rock on! :-)
- MJulian Worden @McJulian
@Kitch Thanks for the response!
Unfortunately, I had already tried this and it doesn't fix the issue, it's still as if SoundFlow just doesn't see
'package:cltysuhgt0003r110rrlojkeb'
and I get the same error I mentioned before.Kitch Membery @Kitch2024-03-19 20:59:31.351Z
I'll take a look and see if I can recreate the issue. :-)
- In reply toMcJulian⬆:
Kitch Membery @Kitch2024-03-19 21:23:12.442Z
Hi Julian,
Here is a video with it working for me.
Let me know if I've misunderstood what you're trying to do. :-)
- In reply toMcJulian⬆:
Kitch Membery @Kitch2024-03-19 21:33:24.011Z
Here's a little extra info on export/require.
I hope that helps. :-)
- MJulian Worden @McJulian
@Kitch Thank you so much for your time on this!
It looks like my lack of very much experience with JavaScript combined with that error message was confusing me, after following the steps in your videos everything is working now and I have a better understanding of how different scripts can work together.
Thanks again for your very prompt help!
Kitch Membery @Kitch2024-03-19 23:11:59.275Z
You're welcome, Julian! Glad I could help you out!
- In reply toMcJulian⬆:Kitch Membery @Kitch2024-03-19 20:52:08.877Z
The following post may be helpful to you, as we can now import type definitions. :-)
- In reply toMcJulian⬆:Christian Scheuer @chrscheuer2024-03-19 21:36:14.047Z
Hi Julian,
This error is merely the syntax highlighting not working with this style of using
require
:Cannot find module 'package:cltysuhgt0003r110rrlojkeb'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
It would actually run the code just fine.
You can use the newer require syntax to get syntax highlighting working well:
- MJulian Worden @McJulian
@chrscheuer Thanks, Christian! Yes, Kitch brought that to my attention in our thread above. I was just misunderstanding the error, I'm all good now and I'll be sure to give that newer syntax a shot. I appreciate your time!