[SOLVED] How can I create a module with a dependency (pulling in another module)? For example I'm creating a testModule and need to use Wahlström's textLayer module. I tried requiring it before the testModule but no dice.
Framer uses NPM. Here is a tutorial on how to do that.
To clarify, I'm importing both modules, but `testModule` doesn't understand that the `textLayer` module has already been required
Hey Aaron! Where are you setting that require? In the module itself or in the Framer project? Here's a screenshot of one of the modules I'm working on with a project - note that I'm requiring other modules as well. Sorry it's a Dropbox screenshot - not at my computer at the moment.
^ Yep this is what I do too!
Joshua I tried both in the project and in the module itself. Where do those modules live in relationship to the one you showed, in the same directory? I have a feeling it's just a folder structure issue I'm having.
All the modules are located inside /modules.
What happens when you run 'npm test'
For me they all live inside the modules folder.
Thanks everyone, looks like something was broken in my project. I created a new one and it worked. Weird.