[Fix]: Dev Setup Issues (Extension resolution + Missing/deprecated dependencies + Build errors) #2596
+27,599
−8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR addresses several issues encountered during the initial project setup.
1. Module Not Found on
npm install
Root Cause:
Webpack config files are executed by Node.js. Since Node doesn’t natively resolve
.ts
files, a loader such asts-node
is required.Fix:
Rather than explicitly adding
.ts
extensions to every import (which led to additional issues), I opted to run Webpack viats-node
, which only required a single update topackage.json
.2. Unnecessary Dependencies Being Bundled
Root Cause:
Webpack attempted to bundle dependencies that are not required for the renderer (frontend) build.
Fix:
Excluded those dependencies in the Webpack configuration.
3. Missing / Deprecated Dependencies
Root Cause:
Both these causing the app to crash with errors
zod
was missing entirelysass-loader
version uses the deprecated legacy APIFix:
Installed
zod
and upgradedsass-loader
to a non-deprecated version.4. Dev Build Errors
Root Cause:
sortSessions
and related helpers received aPromise<Session[]>
, but the async value was not awaited before use.Fix:
Properly handled the promise when accessing
sessions
.Additional Notes
Steps to reproduce
npm install
will throw errors 1 and 2 mentioned abovenpm run dev
will throw errors 3 and 4Tested with Node 24.1.0 on macOS 14.4.1 —
npm run dev
succeeds and the app launches successfully (see screenshot below).Fixes the following Open issues:
Screenshots
Successful launch on
npm dev
Contributor Agreement
By submitting this Pull Request, I confirm that I have read and agree to the following terms:
Please check the box below to confirm:
[X] I have read and agree with the above statement.