Comment on page
Troubleshooting Omlet
If you see one of the following symptoms:
- Duplicate components
- The usage count of some components seems inconsistent
- Some of my components are tagged as
external
but they shouldn't be
One common reason is that Omlet may not be resolving your import paths properly if you have aliases set up in a TSConfig file or bundlers like Webpack, Babel, or Vite. Omlet tries to detect these automatically, but it might not work for your specific setup.
To handle this case, the CLI has an option to read a configuration file where you can define the aliases. Check CLI configuration for scans for more details..
Double-check that your input parameters are not accidentally filtering out file extensions used to define your components. For instance, if you set an input parameter like
-i '**/*.{tsx,jsx}'
, you might be skipping .ts or .js files where components are defined.This also could be a bug related to Omlet. If you believe that is the case, please contact us at [email protected].
Omlet is designed to support monorepos and automatically detects each package as a separate project.
To submit analyses through proxy servers, you can pass proxy configuration to the CLI using the HTTP_PROXY and HTTPS_PROXY environment variables.
e.g.
HTTP_PROXY=http://example.com:1234 omlet analyze
If you own and manage the component library, you can use Omlet to scan your library like any other repository using
omlet init
or analyze
. Omlet will automatically detect dependencies and usage relationships between repositories.Omlet will still detect the usage of components from 3rd-party libraries like MUI or Ant. However, Omlet will only detect components used inside your project rather than all the components defined in the external library.
Omlet supplies sensible default configurations to ignore certain files such as Storybook stories documentation or test files:
**/node_modules/**
**/*.d.ts
**/stories/**/*
**/.storybook/**/*
**/*.stories.{jsx,tsx,js,ts}
**/*.{spec,test}.{jsx,tsx,js,ts}
**/{__test__,tests}/**/*.{jsx,tsx,js,ts}
However, if you have other directories, files, or components that you would like to filter out, use the
--ignore
option. You can also pass multiple ignore patterns:--ignore '**/utils/**' --ignore 'deprecated/**/*.{tsx,jsx}'
If you're running into CLI errors, try updating to the latest version of the CLI.
You can also add the
--verbose --log-level debug
options to output detailed logs in the CLI. It will let you know if errors are occurring from a certain file and use --ignore
option to filter out those files to complete the sync. Your session may have timed out, or you logged out of Omlet. Try running
npx omlet login
(or npx @omlet/cli login --print-token
if you are running it outside of your repository).This error may also happen when Omlet tries to scan a large project with many components and complex dependencies or a large file that is unrelated to a component. Try narrowing down the directories and files that Omlet CLI scans using the
-i
parameter. Omlet will automatically direct you to the workspace you created or the workspace you were invited to first. If you are invited to multiple workspaces, you can enter a URL with a specific workspace name, such as:
https://feta.omlet.dev/my_other_workspace
To upload a scan to a workspace you're invited to, rather than your default workspace, you will need to acquire the access token of this workspace from the owner account first. The account owner can print their access token using the below CLI command:
npx omlet login --print-token
Once you get the token, you can add it to an environment variable named
OMLET_TOKEN
. Omlet CLI will automatically use this environment variable and upload the scan to the specific workspace.Omlet does not provide a test instance within the same workspace. We would recommend creating a separate workspace for testing purposes.
Navigate to the "All scans" page using the workspace menu on the top left. From there, you can delete individual scans you have made previously.

If you want to start from a blank slate, you can go to the "All Scans" page and delete your past scans individually. If you have too many scans to delete, contact us at [email protected].
Last modified 1mo ago