Summary
After today’s Plasmic Studio update (Aug 15, 2025), codegen is generating malformed import statements with empty module paths, causing complete build failures for projects using external Plasmic dependencies. Confirmed on both local builds and Vercel production builds - this is not an environment-specific issue.
Error
Module not found: Empty dependency (no request)
https://nextjs.org/docs/messages/module-not-found
Affected Code
Generated files contain broken imports like:
import { _useStyleTokens as useStyleTokens_antd_5_hostless } from ""; // plasmic-import: ohDidvG9XsCeFumugENU3J/styleTokensProvider
Environment
- Date: August 15, 2025
- Plasmic Packages Updated:
@plasmicapp/react-web
:0.2.381
→0.2.398
@plasmicapp/cli
:0.1.341
→0.1.342
- Framework: Next.js 14.2.28
- Language: TypeScript
- Tested On:
Local development build,
Vercel production build
Project Details
- Main Project ID:
mHePzBFze6PJcjfERHFGjK
(OwnerCo Website) - Affected Dependency:
ohDidvG9XsCeFumugENU3J
(antd5 hostless) - Plasmic.json shows:
"styleTokensProviderFilePath": ""
for antd5 hostless
Root Cause Analysis
What Changed
The new Style Tokens feature replaced CSS module imports with hook-based imports:
Before (working):
import plasmic_antd_5_hostless_css from "../antd_5_hostless/plasmic.module.css";
// Usage: plasmic_antd_5_hostless_css.plasmic_tokens
After (broken):
import { _useStyleTokens as useStyleTokens_antd_5_hostless } from ""; // ❌ Empty path
// Usage: useStyleTokens_antd_5_hostless()
The Bug
Plasmic correctly identifies that
antd5 hostless
has no StyleTokensProviderSets
"styleTokensProviderFilePath": ""
in plasmic.jsonBut still generates import statement with empty path
Should either create the missing file OR skip the import
Affected Files (some, there are many more)
- PlasmicAaaElements.tsx (line 65)
- PlasmicAccess.tsx (line 66)
- PlasmicBorrow.tsx (line 69)
- PlasmicBorrowApplication.tsx (line 68)
- PlasmicBorrowEligibility.tsx (line 68)
Note: Build fails fast, but CONFIRMED that these are just the first 5 files in alphabetical order and I have 37 files total have the broken import.
Impact
Complete build failure - no deployments possible
Widespread: Affects any project using popular hostless dependencies
Immediate: Blocks all users who sync after ~21:22 UTC today
Severity: High Priority - Blocking deployments for affected projects
Expected Behavior
For dependencies without StyleTokensProvider, codegen should either:
- Skip the import entirely, OR
- Create a default StyleTokensProvider file for the dependency
Reproduction Steps
- Have a project using
antd5 hostless
or similar external dependency - Sync with Plasmic Studio after Aug 15, 2025
- Run
npm run build
(local or production) - Observe “Empty dependency” errors
Workaround Status
No clean workaround available:
- Can’t edit generated files (overwritten on sync)
- Can’t remove dependency (breaks existing components)
- Removing dependency would require major refactoring
Additional Context
- This appears to be a systematic codegen bug introduced with Style Tokens rollout
- Projects using popular hostless libraries likely affected
- The feature works correctly for main projects (StyleTokensProvider created successfully)
- Bug is specifically in dependency resolution logic
- Affects both local and production builds - confirmed not environment-specific
Request
Please address this issue as it’s blocking deployments for projects using external Plasmic dependencies.
Commit showing the issue: 0e7ed24377bf0f615a3343a998ef3e71d8d87085
Studio URL: Plasmic