Importing dependencies for React project

Hello, I am very new to React and have what feels like a stupid question.
I’m starting out with the HubSpot React quickstart tutorial, and have been able to upload and deploy the practice theme successfully. However, I am having trouble importing external dependencies.
For example, if I include:

import { Info } from ‘lucide-react’;
and use it within the Getting Started module, it works just fine in the local development server. But when I upload my project I get the following error:

[ERROR][theme]28 Jan 2026 10:35 PM ESTcms-js-build failed

[ERROR][theme]28 Jan 2026 10:35 PM EST

[ERROR][theme]28 Jan 2026 10:35 PM ESTExit code: 1

[ERROR][theme]28 Jan 2026 10:35 PM EST

[ERROR][theme]28 Jan 2026 10:35 PM ESTSTDOUT:

[ERROR][theme]28 Jan 2026 10:35 PM ESTModule and partial “entry points” to build: components/modules/GettingStarted/index

[ERROR][theme]28 Jan 2026 10:35 PM EST

[ERROR][theme]28 Jan 2026 10:35 PM EST

[ERROR][theme]28 Jan 2026 10:35 PM EST

[ERROR][theme]28 Jan 2026 10:35 PM ESTINTROSPECTION BUILD

[ERROR][theme]28 Jan 2026 10:35 PM EST===================

[ERROR][theme]28 Jan 2026 10:35 PM EST

[ERROR][theme]28 Jan 2026 10:35 PM EST

[ERROR][theme]28 Jan 2026 10:35 PM EST

[ERROR][theme]28 Jan 2026 10:35 PM ESTvite v5.4.8 building SSR bundle for production…

[ERROR][theme]28 Jan 2026 10:35 PM ESTtransforming…

[ERROR][theme]28 Jan 2026 10:35 PM EST✓ 1 modules transformed.

[ERROR][theme]28 Jan 2026 10:35 PM EST

[ERROR][theme]28 Jan 2026 10:35 PM ESTSTDERR:

[ERROR][theme]28 Jan 2026 10:35 PM ESTx Build failed in 66ms

[ERROR][theme]28 Jan 2026 10:35 PM ESTnode:internal/modules/run_main:123

[ERROR][theme]28 Jan 2026 10:35 PM EST triggerUncaughtException(

[ERROR][theme]28 Jan 2026 10:35 PM EST ^

[ERROR][theme]28 Jan 2026 10:35 PM EST

[ERROR][theme]28 Jan 2026 10:35 PM EST[dataCoordination] [plugin dataCoordination] There was an error during the build:

[ERROR][theme]28 Jan 2026 10:35 PM EST [vite]: Rollup failed to resolve import “lucide-react” from “/tmp/cms_S94nwL/cms-js-build/customer-package/components/modules/GettingStarted/index.tsx”.

[ERROR][theme]28 Jan 2026 10:35 PM ESTThis is most likely unintended because it can break your application at runtime.

[ERROR][theme]28 Jan 2026 10:35 PM ESTIf you do want to externalize this module explicitly add it to

[ERROR][theme]28 Jan 2026 10:35 PM EST`build.rollupOptions.external`

What am I missing? Thanks!

Hi there @AWilling thank you for posting!

I want to share an article that offers relevant context for your issue: CMS React styling - HubSpot docs

I also want to tag a few community experts to offer insights and ideas to help you find a solution. Hey there @MichaelMa @SteveHTM @evaldas How’s your week going? Any ideas that can help us out here? Thanks!!

Victor

Thanks @Victor_Becerra, I figured it out! I needed to include my dependencies in my project.json file within the theme itself - I was including them in the parent project. I found the hs project install-deps command very useful for this.