Make sure you're using a folder-based project. Alternatively, you can open a .framerx file’s temporary location while the project is opened in Framer X by selecting File → Show Project Folder.
Use the terminal to navigate to your project location:
~ $ cd project.framerfx
Now you can install any NPM package using Yarn.
~/project.framerfx $ yarn add lodash @types/lodash
From here, the package will be added to the
package.json file. It will be available in all your code components and automatically installed as a dependency whenever a project gets opened.
To learn about using components from NPM libraries, see our answer to How do I import other components into my code component?.